* { box-sizing: border-box; }

:root {
  --pink: #F3829A;
  --evergreen: #17372E;
  --honey: #E9B949;
  --oat: #F6F1E7;
  --pink-ink: #8c0d28;
}

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--oat);
  color: var(--evergreen);
}

.page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
}

.header-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero {
  padding: 8px 20px 26px;
  border-bottom: 1px solid rgba(23, 55, 46, 0.1);
}

.hero-tag {
  display: inline-block;
  background: var(--honey);
  color: var(--evergreen);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.hero-sub {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.8;
  max-width: 460px;
}

.hero-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
}

.hero-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--evergreen);
  color: var(--oat);
  font-size: 11px;
  font-weight: 800;
}

.chat {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.bubble {
  max-width: 82%;
  padding: 13px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  border-radius: 18px;
  animation: pop-in 0.18s ease-out;
}

.bubble.bot {
  background: #fff;
  border: 1px solid rgba(23, 55, 46, 0.12);
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 1px 2px rgba(46, 43, 37, 0.06);
  align-self: flex-start;
}

.bubble.me {
  background: var(--pink);
  border-radius: 18px 18px 18px 4px;
  align-self: flex-end;
}

.bubble.them-a,
.bubble.them-b {
  background: #fff;
  border: 1px solid rgba(23, 55, 46, 0.12);
  border-radius: 4px 18px 18px 18px;
  align-self: flex-start;
}

.bubble.them-b {
  background: rgba(243, 130, 154, 0.12);
  align-self: flex-end;
  border-radius: 18px 4px 18px 18px;
}

.bubble-name {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 4px;
}

.bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  align-self: flex-start;
}

.bubble-wrap.align-right {
  align-self: flex-end;
  align-items: flex-end;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.cta-button {
  margin-top: 6px;
  align-self: center;
  background: var(--evergreen);
  color: var(--oat);
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  box-shadow: 0 6px 16px rgba(23, 55, 46, 0.25);
  cursor: pointer;
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.composer {
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(23, 55, 46, 0.08);
}

.composer input {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(23, 55, 46, 0.12);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--evergreen);
}

.composer input:disabled {
  color: rgba(23, 55, 46, 0.4);
}

.composer input::placeholder {
  color: rgba(23, 55, 46, 0.4);
}

.thread-channel {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.45;
  margin: 4px 0 2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 55, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  width: 100%;
  max-width: 460px;
  height: min(820px, 92vh);
  background: var(--oat);
  border-radius: 26px;
  box-shadow: 0 20px 48px rgba(23, 55, 46, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(23, 55, 46, 0.12);
  background: #fff;
}

.modal-name {
  font-size: 13.5px;
  font-weight: 800;
}

.modal-sub {
  font-size: 10.5px;
  color: rgba(23, 55, 46, 0.55);
}

.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: rgba(23, 55, 46, 0.45);
  cursor: pointer;
  font-family: inherit;
}

.modal-chat {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.modal-composer {
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(23, 55, 46, 0.1);
  background: #fff;
  display: flex;
  gap: 8px;
}

.modal-composer.hidden {
  display: none;
}

.modal-composer input {
  flex: 1;
  background: #fff;
  border: 1px solid var(--evergreen);
  border-width: 1.5px;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--evergreen);
}

.modal-composer input::placeholder {
  color: rgba(23, 55, 46, 0.4);
}

.modal-composer button {
  background: var(--pink);
  color: var(--evergreen);
  border: none;
  border-radius: 16px;
  padding: 0 18px;
  font-weight: 800;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
}

.modal-composer button:disabled,
.modal-composer input:disabled {
  opacity: 0.5;
  cursor: default;
}

.readout {
  margin: 4px 0 0;
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 3px 10px rgba(46, 43, 37, 0.1);
  align-self: stretch;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(23, 55, 46, 0.1);
}

.score-number {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--evergreen);
  line-height: 1;
}

.score-label {
  font-size: 15px;
  font-weight: 800;
}

.score-sub {
  font-size: 11.5px;
  opacity: 0.6;
  font-weight: 600;
}

.readout-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-ink);
  margin-bottom: 10px;
}

.readout-norm {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.7;
}

.breakdown {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(23, 55, 46, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-row {
  font-size: 13px;
  line-height: 1.5;
}

.breakdown-row-head {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
  margin-bottom: 3px;
}

.breakdown-note {
  opacity: 0.85;
}

.readout-cta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 55, 46, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.readout-cta-text {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.75;
}

.cta-link {
  display: inline-block;
  text-decoration: none;
}

.hidden {
  display: none;
}
