/* ==========================================================================
   Foliyo Conversational Onboarding Details
   Homepage-Aligned Typography, Leaf Icon, Brand Palette & Chat Architecture
   Fully Responsive (Mobile & Desktop)
   ========================================================================== */

:root {
  --bg: #FAFAF8;
  --bg-warm: #F4F4F0;
  --paper: #FAF8F5;
  --card: #FFFFFF;
  --ink: #0F2D21;
  --ink-soft: #244135;
  --muted: #5C6E64;
  --rule: rgba(15, 45, 33, 0.10);
  --rule-soft: rgba(15, 45, 33, 0.06);
  --accent: #B8541A;
  --accent-deep: #8E3F12;
  --accent-soft: #FDEEE4;
  --accent-light: #FFF2E6;
  --blue: #0284C7;
  --blue-hover: #0369A1;
  --blue-tint: #F0F9FF;
  --blue-border: #BAE6FD;
  --green: #047857;
  --green-tint: #ECFDF5;
  --green-border: #A7F3D0;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(15, 45, 33, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 45, 33, 0.07);
  --shadow-lg: 0 16px 48px rgba(15, 45, 33, 0.10);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Top Header Navigation (Range-Style Continuous Linear Progress Bar) ──── */
.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
}

.header-inner {
  height: 60px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 640px) {
  .header-inner {
    height: 52px;
    padding: 0 16px;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  padding: 0;
}

.header-back-btn:hover {
  background: #E2E8F0;
  color: var(--ink);
}

.header-back-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* Homepage-Matched Logo & Leaf Icon */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  font-size: 20px;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.logo-text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo-text span {
  color: var(--accent);
}

@media (max-width: 640px) {
  .logo-text {
    font-size: 17px;
  }
  .logo-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* Range-style Linear Progress Track */
.header-progress-track {
  width: 100%;
  height: 3px;
  background: #E2E8F0;
  position: relative;
  overflow: hidden;
}

.header-progress-fill {
  height: 100%;
  background: var(--ink);
  width: 12%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Right Badge */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-free-assessment {
  background: #FEF08A;
  color: #854D0E;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.header-ria-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.header-ria-badge svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

@media (max-width: 640px) {
  .desktop-only {
    display: none !important;
  }
  .badge-free-assessment {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* ── App Layout ───────────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

/* Left Milestones Sidebar (Desktop) */
.theme-sidebar {
  width: 260px;
  background: var(--bg-warm);
  border-right: 1px solid var(--rule);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  overflow-y: auto;
}

@media (max-width: 860px) {
  .theme-sidebar {
    display: none !important;
  }
}

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.theme-item {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  transition: var(--transition);
}

.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: transparent;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: var(--transition);
}

.theme-item.active .theme-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 84, 26, 0.16);
}

.theme-item.active .theme-label {
  color: var(--ink);
  font-weight: 700;
}

.theme-item.completed .theme-dot {
  background: var(--ink);
  border-color: var(--ink);
}

.theme-item.completed .theme-label {
  color: var(--ink-soft);
}

.sidebar-footnote {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 12px;
}

.sidebar-footnote-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-footnote-icon svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.sidebar-footnote p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Main Chat Stage ──────────────────────────────────────────────────────── */
.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper);
  position: relative;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.stage-container {
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 140px;
  display: flex;
  flex-direction: column;
  flex: 1;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .stage-container {
    padding: 20px 16px 130px;
    width: 100%;
    max-width: 100%;
  }
}

.chat-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ── Chat Bubbles ─────────────────────────────────────────────────────────── */
.chat-bubble {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  animation: bubbleFadeIn 0.25s ease-out forwards;
}

@keyframes bubbleFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bubble-avatar {
  display: none !important;
}

.bubble-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble-title {
  font-size: clamp(30px, 7.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #0F172A;
  line-height: 1.08;
  margin-bottom: 4px;
}

.bubble-subtitle {
  font-size: clamp(15.5px, 3.8vw, 17.5px);
  color: #475569;
  line-height: 1.45;
  margin-bottom: 16px;
  font-weight: 400;
}

.bubble-subtitle strong {
  color: #0F172A;
  font-weight: 600;
}

/* User Bubble (Response on Right) */
.chat-bubble.user-bubble {
  justify-content: flex-end;
}

.chat-bubble.user-bubble .bubble-content {
  flex: initial;
  max-width: 82%;
}

.user-message-card {
  background: var(--ink);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-lg) 2px var(--radius-lg) var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  display: inline-block;
}

/* Typing Indicator Bubble */
.typing-bubble .bubble-content {
  gap: 0;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: fit-content;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ── Interactive Input Modules in Chat ────────────────────────────────────── */
.interactive-module {
  margin-top: 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  animation: moduleFadeIn 0.25s ease-out forwards;
}

@keyframes moduleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.interactive-module.locked,
.interactive-module.locked * {
  pointer-events: none !important;
  cursor: default !important;
  user-select: none;
}

.interactive-module.locked {
  opacity: 0.82;
}

.interactive-module.locked input,
.interactive-module.locked button,
.interactive-module.locked select {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* ── Range-Style Fixed Bottom Action Dock (Thumb-Zone Floating Navigation) ─ */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (min-width: 861px) {
  .bottom-dock {
    left: 260px; /* Aligns with chat stage on desktop */
    background: rgba(250, 248, 245, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--rule);
  }
}

.bottom-dock-inner {
  width: 100%;
  max-width: 520px;
  display: flex;
  justify-content: center;
}

.btn-continue,
.bottom-dock .btn-continue,
.booking-card .btn-continue,
#chatBookingSubmitBtn {
  width: 100%;
  height: 54px;
  background: #0066FF;
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  user-select: none;
  text-decoration: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.btn-continue:hover,
.bottom-dock .btn-continue:hover,
.booking-card .btn-continue:hover,
#chatBookingSubmitBtn:hover {
  background: #0052CC;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.38);
}

.btn-continue:active,
.bottom-dock .btn-continue:active,
.booking-card .btn-continue:active,
#chatBookingSubmitBtn:active {
  transform: scale(0.99);
}

.btn-continue:disabled,
.bottom-dock .btn-continue:disabled,
.booking-card .btn-continue:disabled,
#chatBookingSubmitBtn:disabled {
  background: #CBD5E1 !important;
  color: #94A3B8 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.bottom-dock.dock-hidden {
  display: none !important;
}

/* Fallback for inline buttons to prevent duplication or overlap */
.btn-continue-wrap {
  display: none !important;
}

/* ── Range-Style 2x2 Grid (Focus Areas) ────────────────────────────── */
.range-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.range-grid-card {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 18px;
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-sizing: border-box;
  min-height: 148px;
  position: relative;
}

.range-grid-card:hover {
  border-color: #94A3B8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.range-grid-card:active {
  transform: scale(0.98);
}

.range-grid-card.selected {
  border: 2px solid #0066FF !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 1px #0066FF, 0 8px 20px rgba(0, 102, 255, 0.12);
}

.grid-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #EEF4FF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0066FF;
  font-size: 20px;
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.grid-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: #0066FF;
  stroke-width: 2.2;
}

.range-grid-card.selected .grid-card-icon {
  background: #DBEAFE;
  transform: scale(1.05);
}

.grid-card-title {
  font-size: 15.5px;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.25;
  margin-bottom: 12px;
}

.grid-card-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  transition: all 0.15s ease;
}

.grid-card-check svg {
  display: none !important;
  width: 14px;
  height: 14px;
  stroke: #FFFFFF !important;
  stroke-width: 3 !important;
}

.range-grid-card.selected .grid-card-check {
  background: #0066FF;
  border-color: #0066FF;
}

.range-grid-card.selected .grid-card-check svg {
  display: block !important;
}

/* ── Thumb-Friendly Option Cards (Matching Range Exactly) ──────────── */
.pill-cards-list, .selection-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.pill-card, .selection-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 64px;
}

.pill-card:hover, .selection-card:hover {
  border-color: #CBD5E1;
  background: #FDFEFE;
}

.pill-card:active, .selection-card:active {
  transform: scale(0.99);
}

.pill-card.selected, .selection-card.selected {
  border: 2px solid #0066FF !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 1px #0066FF, 0 4px 12px rgba(0, 102, 255, 0.08);
}

/* Optional leading icon for editorial option cards */
.pill-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0066FF;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.pill-icon svg {
  width: 20px;
  height: 20px;
  stroke: #0066FF;
  stroke-width: 2.2;
}

.pill-card.selected .pill-icon {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #0066FF;
  transform: scale(1.04);
}

/* Checkbox in Pill Card (Multi Select) */
.pill-check, .card-check {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.pill-check svg, .card-check svg {
  display: none !important;
  width: 14px;
  height: 14px;
  stroke: #FFFFFF !important;
  stroke-width: 3 !important;
}

.pill-card.selected .pill-check,
.selection-card.selected .card-check {
  background: #0066FF;
  border-color: #0066FF;
}

.pill-card.selected .pill-check svg,
.selection-card.selected .card-check svg {
  display: block !important;
}

/* Radio Indicator in Pill Card (Single Select) */
.radio-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transform: scale(0);
  transition: all 0.15s ease;
}

.pill-card.selected .radio-indicator {
  border-color: #0066FF;
}

.pill-card.selected .radio-dot {
  background: #0066FF;
  transform: scale(1);
}

.pill-card-body, .card-content-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pill-card-title, .card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.pill-card-sub, .card-desc {
  font-size: 14.5px;
  color: #475569;
  margin-top: 2px;
  line-height: 1.4;
  font-weight: 400;
}

@media (max-width: 640px) {
  .pill-card, .selection-card {
    padding: 16px 16px;
    gap: 14px;
    border-radius: 16px;
    min-height: 64px;
  }

  .pill-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  .pill-icon svg {
    width: 20px;
    height: 20px;
  }

  .pill-card-title, .card-title {
    font-size: 16.5px;
    line-height: 1.25;
  }

  .pill-card-sub, .card-desc {
    font-size: 13.5px;
    line-height: 1.38;
  }

  .pill-check, .card-check {
    width: 24px;
    height: 24px;
  }
}

/* ── Interactive Sliders ─────────────────────────────────────────────────── */
.slider-wrap {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 22px 18px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.slider-val-display {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 14px;
  font-family: var(--font-sans);
}

.custom-range-slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: #E2E8F0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-bottom: 10px;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--accent);
}

.slider-bounds {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.stage-insight-box {
  background: #FEF9C3;
  border: 1px solid #FDE047;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 12.5px;
  color: #713F12;
  line-height: 1.45;
  box-sizing: border-box;
}

/* ── Value Comparison Tables (Mobile-Optimized & Touch-Scrollable) ───────── */
.table-scroll-hint {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 8px;
  margin-bottom: 4px;
}

.table-scroll-hint svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

/* ── Compact Single-Screen Comparison Section (Zero Scroll on Mobile) ─── */
[data-step-key="masterComp"] .bubble-title {
  margin-bottom: 2px;
}

[data-step-key="masterComp"] .bubble-subtitle {
  margin-bottom: 10px;
  font-size: clamp(14px, 3.5vw, 15.5px);
}

@media (max-height: 720px) {
  .stage-container {
    padding-top: 6px !important;
  }
  [data-step-key="masterComp"] .bubble-title {
    font-size: 20px !important;
    margin-bottom: 1px !important;
  }
  [data-step-key="masterComp"] .bubble-subtitle {
    font-size: 12.5px !important;
    margin-bottom: 5px !important;
  }
  .impact-hero-strip {
    padding: 5px 10px !important;
  }
  .comp-single-card {
    padding: 6px 10px !important;
  }
  .comp-row-sep {
    margin: 4px 0 !important;
  }
  .contrast-line {
    padding: 2px 6px !important;
    font-size: 11px !important;
  }
}

.comp-compact-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* 1. Hero Impact Strip */
.impact-hero-strip {
  background: linear-gradient(135deg, #F0FDF4 0%, #EFF6FF 100%);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: 0 1px 4px rgba(0, 102, 255, 0.04);
  box-sizing: border-box;
  width: 100%;
}

.strip-header {
  margin-bottom: 4px;
}

.strip-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1E40AF;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  display: inline-block;
}

.strip-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.strip-col {
  flex: 1;
  min-width: 0;
}

.strip-num {
  font-family: var(--font-sans);
  font-size: clamp(16px, 4.2vw, 20px);
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.strip-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-top: 1px;
  line-height: 1.2;
}

.strip-divider {
  width: 1px;
  height: 28px;
  background: #CBD5E1;
  flex-shrink: 0;
}

/* 2. Editorial Comparison Card (The Foliyo RIA Advantage) */
.ria-editorial-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xl);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 540px) {
  .ria-editorial-card {
    padding: 12px 10px;
    border-radius: var(--radius-lg);
  }
}

.ria-editorial-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.ria-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.ria-icon-box svg {
  width: 16px;
  height: 16px;
}

.ria-icon-box.icon-blue {
  background: rgba(0, 102, 255, 0.08);
  color: #0066FF;
}

.ria-icon-box.icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.ria-icon-box.icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
}

.ria-row-content {
  flex: 1;
  min-width: 0;
}

.ria-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ria-row-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

.ria-pill-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #0066FF;
  background: rgba(0, 102, 255, 0.06);
  border: 1px solid rgba(0, 102, 255, 0.15);
  border-radius: 20px;
  padding: 1.5px 7px;
  white-space: nowrap;
}

.ria-pill-tag.green {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.ria-pill-tag.purple {
  color: #7C3AED;
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}

.ria-point-foliyo {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #1E293B;
  margin-bottom: 2px;
}

.ria-check-mark {
  color: #16A34A;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ria-foliyo-text {
  font-size: 12.5px;
  color: #1E293B;
  line-height: 1.4;
}

.ria-foliyo-text strong {
  color: #0F172A;
  font-weight: 600;
}

.ria-point-bank {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.35;
  padding-left: 15px;
}

.ria-bank-text {
  color: #64748B;
  font-style: italic;
}

.ria-row-divider {
  height: 1px;
  background: #F1F5F9;
  margin: 10px 0;
  width: 100%;
}

/* ── Comparison Table (Retirement & Tax Matrix) ── */
.table-scroll-hint {
  display: none;
}

.comp-table-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
}

.comp-table-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.comp-table-header {
  padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  box-sizing: border-box;
}

.comp-table-cols {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comp-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #F1F5F9;
  gap: 12px;
  box-sizing: border-box;
}

.comp-table-row:last-child {
  border-bottom: none;
}

.comp-row-content {
  flex: 1;
  min-width: 0;
}

.comp-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.comp-row-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}

.comp-row-indicators {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.check-green {
  color: #16A34A;
  font-weight: 800;
  font-size: 14px;
  display: inline-block;
}

.cross-dash {
  color: #94A3B8;
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
}

/* ── Range/Facet-Style Investment Growth Projection Chart ───────────────── */
.returns-projection-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

[data-step-key="returnsProj"] .bubble-title {
  margin-bottom: 2px;
}

[data-step-key="returnsProj"] .bubble-subtitle {
  margin-bottom: 8px;
  font-size: clamp(13.5px, 3.5vw, 15px);
}

.proj-chart-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .proj-chart-card {
    padding: 12px 10px 10px;
    border-radius: 14px;
    margin-top: 2px;
  }
}

.proj-chart-svg-wrap {
  width: 100%;
  overflow: visible;
}

.proj-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.proj-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.proj-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #0F172A;
}

.proj-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-current {
  background: #FF7A00;
}

.dot-foliyo {
  background: #0066FF;
}

.proj-delta-callout {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.proj-delta-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #0066FF;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.proj-delta-text {
  font-size: 12px;
  color: #1E3A8A;
  line-height: 1.35;
}

.proj-delta-text strong {
  color: #0066FF;
  font-weight: 700;
}

.proj-footnote {
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.45;
  margin-top: 14px;
  text-align: center;
}

/* ── Inline Interstitial State Card ───────────────────────────────────────── */
.interstitial-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xl);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
}

.interstitial-title {
  font-size: clamp(20px, 3.5vw, 24px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.interstitial-track {
  width: 280px;
  max-width: 100%;
  height: 4.5px;
  border-radius: var(--radius-full);
  background: #E2E8F0;
  overflow: hidden;
  margin-bottom: 14px;
}

.interstitial-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #0284c7 0%, #8b5cf6 50%, #b8541a 100%);
  width: 0%;
  animation: sweepFill 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sweepFill {
  0% { width: 0%; }
  45% { width: 68%; }
  85% { width: 92%; }
  100% { width: 100%; }
}

.interstitial-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Advisor Match & Reused Call Booking Flow ─────────────────────────────── */
.booking-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .booking-card {
    padding: 16px 14px;
  }
}

.specialist-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.specialist-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1.5px solid rgba(184, 84, 26, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.specialist-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(184, 84, 26, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.specialist-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.specialist-header p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* Calendar Days 3-Column Grid */
.cal-days-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin: 8px 0 14px;
}

.cal-day-card {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1.5px solid rgba(15, 45, 33, 0.12);
  background: #FFFFFF;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.2s ease;
}

.cal-day-card:hover {
  border-color: var(--muted);
}

.cal-day-card.dsel {
  background: rgba(184, 84, 26, 0.06);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.cal-day-name {
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cal-day-card.dsel .cal-day-name {
  color: var(--accent);
}

.cal-day-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}

.cal-day-month {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

/* Available Times Grid (3 Columns) */
.cal-times-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.cal-times-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 14px;
}

.cal-time-btn {
  padding: 7px 4px;
  border-radius: 9px;
  border: 1.5px solid rgba(15, 45, 33, 0.12);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 46px;
}

.cal-time-btn:not(.is-booked):hover {
  border-color: var(--accent);
  background: #FFF7ED;
}

.cal-time-btn.tsel {
  background: var(--ink) !important;
  color: #FFFFFF !important;
  border-color: var(--ink) !important;
}

.cal-time-btn.tsel .slot-time {
  color: #FFFFFF !important;
}

.cal-time-btn.is-booked {
  background: #E2E8F0 !important;
  border-color: #CBD5E1 !important;
  color: #64748B !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.cal-time-btn.is-booked .slot-time {
  color: #64748B !important;
  font-weight: 500;
}

.slot-booked-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569 !important;
  background: #CBD5E1 !important;
  padding: 1.5px 5px;
  border-radius: 4px;
  line-height: 1.1;
}

.summary-strip {
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--ink-soft);
  width: 100%;
  box-sizing: border-box;
}

.summary-badge {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  margin-right: 4px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

@media (max-width: 540px) {
  .input-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.input-field {
  width: 100%;
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.input-field:focus {
  background: #FFFFFF;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.phone-row {
  display: flex;
  margin-bottom: 14px;
  width: 100%;
}

.phone-prefix {
  background: #E2E8F0;
  border: 1px solid var(--rule);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.phone-row .input-field {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Success Card */
.success-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xl);
  padding: 28px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.success-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-tint);
  border: 1.5px solid var(--green-border);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin: 0 auto 14px;
}

/* ── Identity & OTP Verification Module ──────────────────────────────────── */
.auth-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.auth-field-group {
  margin-bottom: 14px;
  width: 100%;
}

.auth-field-group:last-of-type {
  margin-bottom: 10px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.auth-trust-note {
  font-size: 11.5px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  line-height: 1.35;
}

/* OTP Verification Card */
.otp-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.otp-inputs-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.otp-digit {
  width: 44px;
  height: 52px;
  border: 2px solid var(--rule);
  border-radius: 10px;
  background: var(--bg-warm);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .otp-inputs-row {
    gap: 6px;
  }
  .otp-digit {
    width: 38px;
    height: 48px;
    font-size: 18px;
  }
}

.otp-digit:focus {
  background: #FFFFFF;
  border-color: #0066FF;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

.return-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #4338CA;
  text-decoration: none;
  transition: color 0.15s ease;
  margin-top: 4px;
  cursor: pointer;
}

.return-home-link:hover {
  color: #312E81;
  text-decoration: underline;
}

.otp-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.otp-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0066FF;
  display: inline-block;
}

.otp-resend-row {
  font-size: 12px;
  color: var(--muted);
}

.otp-resend-btn {
  background: none;
  border: none;
  color: #0066FF;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  font-family: inherit;
  font-size: 12px;
}

.otp-resend-btn:hover {
  text-decoration: underline;
}
