/* ═══════════════════════════════════════════════
   CHOOSING THERAPY — PAGE STYLES
   Brand: charcoal #222326, electric blue #358fe7
   Fonts: Oswald (headings), Raleway (body)
═══════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────── */
.ct-hero {
  background: linear-gradient(160deg, #191b1f 0%, #222326 40%, #1a2535 100%);
  padding: 120px 24px 72px;
  text-align: center;
  border-bottom: 1px solid rgba(53,143,231,0.2);
  position: relative;
  overflow: hidden;
}
.ct-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(53,143,231,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.ct-hero-inner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}
.ct-hero-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #358fe7;
  border: 1px solid rgba(53,143,231,0.4);
  border-radius: 2px;
  padding: 6px 16px;
  margin-bottom: 24px;
}
.ct-hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}
.ct-hero-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  color: #a0a8b4;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 36px;
}
.ct-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.ct-stat {
  display: flex;
  flex-direction: column;
  padding: 0 32px;
}
.ct-stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #358fe7;
  line-height: 1;
}
.ct-stat-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #6b7280;
  text-transform: uppercase;
  margin-top: 4px;
}
.ct-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
}

/* ── Main Section ─────────────────────────── */
.ct-section {
  background: #1a1c20;
  padding: 60px 24px 80px;
  min-height: 600px;
}
.ct-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

/* ── Chat Container ────────────────────────── */
.ct-chat-container {
  background: #1e2128;
  border: 1px solid rgba(53,143,231,0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

/* ── API Key Notice ─────────────────────────── */
.ct-api-notice {
  background: rgba(53,143,231,0.08);
  border-bottom: 1px solid rgba(53,143,231,0.2);
  padding: 20px 24px;
}
.ct-api-notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.ct-api-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.ct-api-notice strong {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 4px;
}
.ct-api-notice p {
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  color: #8d9aaa;
  margin-bottom: 12px;
  line-height: 1.5;
}
.ct-api-input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ct-api-input-row input {
  flex: 1;
  min-width: 220px;
  background: #14161a;
  border: 1px solid rgba(53,143,231,0.3);
  border-radius: 6px;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.ct-api-input-row input:focus {
  border-color: #358fe7;
}
.ct-api-input-row input::placeholder {
  color: #4a5568;
}

/* ── Messages Area ─────────────────────────── */
.ct-messages {
  padding: 28px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
  max-height: 460px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.ct-messages::-webkit-scrollbar { width: 4px; }
.ct-messages::-webkit-scrollbar-track { background: transparent; }
.ct-messages::-webkit-scrollbar-thumb { background: rgba(53,143,231,0.3); border-radius: 2px; }

/* ── Message Rows ─────────────────────────── */
.ct-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  animation: ctFadeUp 0.3s ease both;
}
.ct-msg-row.ct-bot { justify-content: flex-start; }
.ct-msg-row.ct-user { justify-content: flex-end; }

@keyframes ctFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ct-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #358fe7, #1e73be);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  font-style: normal;
}

/* ── Bubbles ─────────────────────────────── */
.ct-bubble {
  max-width: 78%;
  padding: 14px 18px;
  border-radius: 18px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
}
.ct-bubble-bot {
  background: #262b35;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}
.ct-bubble-user {
  background: linear-gradient(135deg, #358fe7, #2a7acd);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* ── Typing Dots ─────────────────────────── */
.ct-typing {
  padding: 0 24px 8px;
}
.ct-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #358fe7;
  margin: 0 2px;
  animation: ctBounce 1.2s infinite ease-in-out;
}
.ct-dot:nth-child(2) { animation-delay: 0.2s; }
.ct-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes ctBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Quick Reply Chips ─────────────────────── */
.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 24px 16px;
  min-height: 0;
  transition: opacity 0.2s;
}
.ct-chip {
  background: transparent;
  border: 1px solid rgba(53,143,231,0.5);
  color: #358fe7;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ct-chip:hover {
  background: #358fe7;
  color: #fff;
  border-color: #358fe7;
}

/* ── Input Row ─────────────────────────────── */
.ct-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #1a1d24;
}
#ct-user-input {
  flex: 1;
  background: #262b35;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  padding: 12px 16px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  max-height: 100px;
  overflow-y: auto;
  line-height: 1.5;
}
#ct-user-input:focus { border-color: #358fe7; }
#ct-user-input::placeholder { color: #4a5568; }
#ct-user-input:disabled { opacity: 0.4; cursor: not-allowed; }

.ct-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #358fe7, #2a7acd);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.2s;
  flex-shrink: 0;
}
.ct-send-btn:hover { transform: scale(1.08); }
.ct-send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.ct-send-btn svg { width: 18px; height: 18px; color: #fff; }

/* ── Buttons ─────────────────────────────── */
.ct-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #358fe7, #2a7acd);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.ct-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.ct-btn-large { padding: 16px 36px; font-size: 1rem; }
.ct-btn-outline {
  display: inline-block;
  background: transparent;
  color: #358fe7;
  border: 1px solid rgba(53,143,231,0.5);
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}
.ct-btn-outline:hover { background: rgba(53,143,231,0.1); border-color: #358fe7; }

/* ── Restart Row ─────────────────────────── */
.ct-restart-row {
  text-align: center;
  padding: 12px 24px 20px;
}
.ct-restart-btn {
  background: none;
  border: none;
  color: #4a5568;
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}
.ct-restart-btn:hover { color: #358fe7; }

/* ── Result Card ─────────────────────────── */
.ct-result-card {
  margin-top: 32px;
  background: #1e2128;
  border: 1px solid rgba(53,143,231,0.35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: ctFadeUp 0.5s ease both;
}
.ct-result-header {
  background: linear-gradient(135deg, #1a2535 0%, #0f1824 100%);
  padding: 36px 36px 28px;
  border-bottom: 1px solid rgba(53,143,231,0.2);
  position: relative;
  overflow: hidden;
}
.ct-result-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(53,143,231,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.ct-result-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #358fe7;
  border: 1px solid rgba(53,143,231,0.4);
  border-radius: 2px;
  padding: 5px 14px;
  margin-bottom: 16px;
}
.ct-result-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
}
.ct-result-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  color: #8d9aaa;
  line-height: 1.6;
}
.ct-result-body {
  padding: 28px 36px;
}
.ct-result-why {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #358fe7;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.ct-result-explanation {
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  color: #c0c8d4;
  line-height: 1.7;
  margin-bottom: 24px;
}
.ct-result-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.ct-result-benefits li {
  font-family: 'Raleway', sans-serif;
  font-size: 0.875rem;
  color: #a0a8b4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.ct-result-benefits li::before {
  content: '✓';
  color: #358fe7;
  font-weight: 700;
  flex-shrink: 0;
}
.ct-also-consider {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 8px;
}
.ct-also-consider-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ct-also-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ct-also-tag {
  background: rgba(53,143,231,0.1);
  border: 1px solid rgba(53,143,231,0.25);
  color: #358fe7;
  border-radius: 20px;
  padding: 4px 14px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
}
.ct-result-actions {
  padding: 0 36px 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.ct-result-disclaimer {
  padding: 16px 36px 20px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  color: #4a5568;
  line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin: 0;
}

/* ── How It Works ────────────────────────── */
.ct-how {
  background: #222326;
  padding: 72px 24px 80px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ct-how .section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  margin-bottom: 52px;
}
.ct-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}
.ct-step {
  flex: 1;
  min-width: 220px;
  max-width: 260px;
  text-align: center;
  padding: 0 16px;
}
.ct-step-num {
  font-family: 'Oswald', sans-serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: rgba(53,143,231,0.25);
  line-height: 1;
  margin-bottom: 16px;
}
.ct-step h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.ct-step p {
  font-family: 'Raleway', sans-serif;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
}
.ct-step-arrow {
  font-size: 1.8rem;
  color: rgba(53,143,231,0.3);
  padding: 0 8px;
  flex-shrink: 0;
}

/* ── Nav Active State ─────────────────────── */
.nav-active {
  color: #358fe7 !important;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 640px) {
  .ct-hero { padding: 100px 16px 52px; }
  .ct-stat { padding: 0 20px; }
  .ct-messages { max-height: 360px; }
  .ct-bubble { max-width: 92%; }
  .ct-result-header,
  .ct-result-body,
  .ct-result-actions { padding-left: 20px; padding-right: 20px; }
  .ct-result-disclaimer { padding-left: 20px; padding-right: 20px; }
  .ct-steps { flex-direction: column; gap: 28px; }
  .ct-step-arrow { transform: rotate(90deg); }
  .ct-stat-divider { height: 30px; }
}

/* ── 3-Card Recommendation Layout ────────────────── */
.ct-rec-card {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 24px 24px 20px;
  margin-bottom: 16px;
  position: relative;
  transition: border-color 0.2s;
}
.ct-rec-card:last-child { margin-bottom: 0; }

/* Rank 1 — most expensive / best match */
.ct-rank-1 {
  background: linear-gradient(135deg, #0f1f35 0%, #1a2840 100%);
  border-color: rgba(53,143,231,0.45);
  box-shadow: 0 0 28px rgba(53,143,231,0.12);
}
/* Rank 2 */
.ct-rank-2 {
  background: #1e2330;
  border-color: rgba(53,143,231,0.2);
}
/* Rank 3 */
.ct-rank-3 {
  background: #191c22;
  border-color: rgba(255,255,255,0.06);
}

.ct-rec-rank {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 2px;
}
.ct-rank-1 .ct-rec-rank {
  color: #fff;
  background: linear-gradient(135deg, #358fe7, #2a7acd);
}
.ct-rank-2 .ct-rec-rank {
  color: #358fe7;
  background: rgba(53,143,231,0.12);
  border: 1px solid rgba(53,143,231,0.3);
}
.ct-rank-3 .ct-rec-rank {
  color: #6b7280;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.ct-rec-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ct-rec-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}
.ct-rec-price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #358fe7;
  white-space: nowrap;
}
.ct-rec-tagline {
  font-family: 'Raleway', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ct-rec-explanation {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  color: #a0a8b4;
  line-height: 1.65;
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .ct-rec-card { padding: 18px 16px; }
  .ct-rec-name { font-size: 1.1rem; }
}
