/* =========================================================================
   The Annuity Institute - Landing Page Styles
   Brand: classical / authoritative. Navy + gold. Cream background.
   Audience: 50-70+. Mobile-first. WCAG AA.
   ========================================================================= */

/* -- Tokens ----------------------------------------------------------- */
:root {
  /* Brand palette */
  --ai-navy:        #0a1f3a;
  --ai-navy-deep:   #061528;
  --ai-navy-soft:   #1c3454;
  --ai-gold:        #c9a961;
  --ai-gold-deep:   #a88846;
  --ai-gold-soft:   #e8d4a3;
  --ai-cream:       #fbf8f1;
  --ai-cream-deep:  #f3ede0;
  --ai-paper:       #ffffff;

  --ai-text:        #0a1f3a;
  --ai-text-muted:  #4a5b73;
  --ai-text-soft:   #7c8a9e;
  --ai-text-on-navy: #f5ecd2;

  --ai-border:      #d7cdb8;
  --ai-border-soft: #e8e0cf;
  --ai-error:       #b91c1c;
  --ai-success:     #15803d;

  /* Type */
  --ai-font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --ai-font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --ai-space-1: 4px;
  --ai-space-2: 8px;
  --ai-space-3: 12px;
  --ai-space-4: 16px;
  --ai-space-5: 24px;
  --ai-space-6: 32px;
  --ai-space-7: 48px;
  --ai-space-8: 64px;
  --ai-space-9: 96px;

  /* Radius */
  --ai-radius-sm: 4px;
  --ai-radius-md: 8px;
  --ai-radius-lg: 14px;

  /* Shadows */
  --ai-shadow-sm: 0 1px 2px rgba(10, 31, 58, 0.06);
  --ai-shadow-md: 0 4px 16px rgba(10, 31, 58, 0.08);
  --ai-shadow-lg: 0 12px 32px rgba(10, 31, 58, 0.12);

  /* Motion */
  --ai-ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ai-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* -- Reset (minimal) -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;             /* base bumped for older readers */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--ai-font-body);
  background: var(--ai-cream);
  color: var(--ai-text);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: var(--ai-navy);
  text-decoration: underline;
  text-decoration-color: var(--ai-gold);
  text-underline-offset: 3px;
}
a:hover { color: var(--ai-gold-deep); }

:focus-visible {
  outline: 3px solid var(--ai-gold);
  outline-offset: 3px;
  border-radius: var(--ai-radius-sm);
}

/* -- Header / brand --------------------------------------------------- */
.ai-header {
  background: var(--ai-navy-deep);
  border-bottom: 1px solid var(--ai-gold-deep);
  padding: var(--ai-space-3) 0;
}
.ai-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--ai-space-5);
  display: flex;
  align-items: center;
}

.ai-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ai-space-3);
  text-decoration: none;
  color: var(--ai-text-on-navy);
}
.ai-brand:hover { text-decoration: none; }

.ai-brand-img {
  display: block;
  height: 56px;
  width: auto;
  max-height: 56px;
  /* PNG already has transparency; tiny shadow gives it depth on the navy header */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.ai-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.ai-brand-the {
  font-family: var(--ai-font-display);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ai-gold-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ai-brand-name {
  font-family: var(--ai-font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ai-cream);
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .ai-brand-img  { height: 46px; max-height: 46px; }
  .ai-brand-the  { font-size: 0.7rem; }
  .ai-brand-name { font-size: 1.05rem; }
}

/* -- Hero ------------------------------------------------------------- */
.ai-hero {
  flex: 1;
  display: flex;
  /* anchor content to the top of the available area so the survey card
     sits above the fold on desktop (was: center, which vertical-centered
     and pushed the H1 way down on tall viewports). */
  align-items: flex-start;
  justify-content: center;
  padding: var(--ai-space-3) var(--ai-space-5) var(--ai-space-7);
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 97, 0.08) 0%, transparent 60%),
    var(--ai-cream);
}
.ai-hero-inner {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.ai-eyebrow {
  display: inline-block;
  font-family: var(--ai-font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ai-gold-deep);
  background: rgba(201, 169, 97, 0.12);
  padding: 6px 14px;
  border-radius: 99px;
  margin: 0 0 var(--ai-space-4) 0;
  border: 1px solid rgba(201, 169, 97, 0.3);
}

.ai-h1 {
  font-family: var(--ai-font-display);
  font-size: clamp(2.3rem, 4.4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-4) 0;
}
.ai-h1-accent {
  display: block;
  font-style: italic;
  color: var(--ai-gold-deep);
  font-weight: 600;
}

.ai-lede {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--ai-text-muted);
  max-width: 600px;
  margin: 0 auto var(--ai-space-5) auto;
}

.ai-trust-row {
  list-style: none;
  padding: 0;
  margin: var(--ai-space-7) 0 var(--ai-space-7) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ai-space-5);
  justify-content: center;
}
.ai-trust-row li {
  display: inline-flex;
  align-items: center;
  gap: var(--ai-space-2);
  font-size: 1.15rem;
  color: var(--ai-text-muted);
  font-weight: 500;
}
.ai-trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ai-gold);
  color: var(--ai-navy-deep);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* -- CTA buttons ------------------------------------------------------ */
.ai-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ai-space-3);
  background: var(--ai-navy);
  color: var(--ai-cream);
  border: 2px solid var(--ai-navy);
  padding: 18px 36px;
  font-family: var(--ai-font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--ai-radius-md);
  min-height: 56px;
  min-width: 280px;
  transition: transform 200ms var(--ai-ease-out),
              box-shadow 200ms var(--ai-ease-out),
              background 200ms ease;
  box-shadow: var(--ai-shadow-md);
}
.ai-cta-primary:hover {
  background: var(--ai-navy-soft);
  transform: translateY(-2px);
  box-shadow: var(--ai-shadow-lg);
}
.ai-cta-primary:active {
  transform: translateY(0);
}
.ai-cta-arrow {
  font-size: 1.2rem;
  transition: transform 200ms var(--ai-ease-out);
}
.ai-cta-primary:hover .ai-cta-arrow {
  transform: translateX(4px);
}

.ai-cta-sub {
  margin-top: var(--ai-space-4);
  font-size: 0.9rem;
  color: var(--ai-text-soft);
}

.ai-cta-privacy {
  margin: var(--ai-space-5) auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ai-text-muted);
}

/* Hide the LP privacy paragraph on the PII step — the contact form has its
   own privacy beats above and below the fields, so this one becomes
   redundant noise once #contact-mount is rendered. */
#contact-mount:not([hidden]) + .ai-cta-privacy {
  display: none;
}

/* -- Survey shell ----------------------------------------------------- */
.ai-survey-shell {
  flex: 1;
  padding: var(--ai-space-7) var(--ai-space-5);
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 97, 0.06) 0%, transparent 60%),
    var(--ai-cream);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.ai-survey-inner {
  width: 100%;
  max-width: 680px;
}

.ai-progress {
  margin-bottom: var(--ai-space-4);
}
.ai-progress-track {
  height: 6px;
  background: var(--ai-cream-deep);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--ai-border-soft);
}
.ai-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ai-gold) 0%, var(--ai-gold-deep) 100%);
  border-radius: 99px;
  transition: width 600ms var(--ai-ease-out);
}
.ai-progress-text {
  margin-top: var(--ai-space-2);
  font-size: 0.85rem;
  color: var(--ai-text-soft);
  text-align: right;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* -- Question card ---------------------------------------------------- */
.ai-card {
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-lg);
  padding: var(--ai-space-7) var(--ai-space-6);
  box-shadow: var(--ai-shadow-md);
  animation: aiCardSlideIn 350ms var(--ai-ease-out) both;
  scroll-margin-top: 24px;
}
.ai-reveal,
.ai-form { scroll-margin-top: 24px; }

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

.ai-card-question {
  font-family: var(--ai-font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-3) 0;
  letter-spacing: -0.01em;
}

.ai-card-justification {
  font-style: italic;
  color: var(--ai-text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 var(--ai-space-6) 0;
  padding-left: var(--ai-space-4);
  border-left: 2px solid var(--ai-gold-soft);
}

.ai-card-subtitle {
  font-size: 0.95rem;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-5) 0;
  line-height: 1.55;
}

/* Q5 echo personalization */
.ai-card-question .ai-echo {
  font-style: italic;
  color: var(--ai-gold-deep);
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  animation: aiEchoFadeIn 600ms var(--ai-ease-out) forwards;
  animation-delay: 250ms;
}

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

/* -- Option buttons --------------------------------------------------- */
.ai-options {
  display: grid;
  gap: var(--ai-space-3);
  margin-top: var(--ai-space-5);
}

.ai-options.binary {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 480px) {
  .ai-options.binary {
    grid-template-columns: 1fr;
  }
}

.ai-option {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ai-paper);
  color: var(--ai-navy);
  border: 2px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  padding: 20px 24px;
  font-family: var(--ai-font-body);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  min-height: 64px;
  transition: all 180ms var(--ai-ease-out);
  box-shadow: var(--ai-shadow-sm);
  width: 100%;
}
.ai-option:hover {
  border-color: var(--ai-gold);
  background: rgba(201, 169, 97, 0.06);
  transform: translateY(-2px);
  box-shadow: var(--ai-shadow-md);
}
.ai-option:active {
  transform: translateY(0);
}
.ai-option.selected {
  border-color: var(--ai-navy);
  background: var(--ai-navy);
  color: var(--ai-cream);
}

/* -- Icon-card option variants (binary-icon + choice-icon) ----------- */
/* Used by Q1 gender, Q2 marital, Q4 retired (binary-icon = 2-col),
   Q6 intent (choice-icon = 3-col), Q7 biggest_worry (choice-icon = 2x2).
   Lucide-style SVGs render gold via currentColor; selected state inverts
   to cream-on-navy with the existing .ai-option.selected rule. */
.ai-options.has-icons .ai-option {
  flex-direction: column;
  gap: 12px;
  padding: 22px 14px;
  min-height: 132px;
  text-align: center;
}
.ai-options.has-icons .ai-option .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--ai-gold);
}
.ai-options.has-icons .ai-option .icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.ai-options.has-icons .ai-option .label {
  font-size: 1rem;
  line-height: 1.25;
}
.ai-options.has-icons .ai-option.selected .icon {
  color: var(--ai-gold);
}

/* Layout: 3-option row (Q6 intent) and 2x2 (Q7 biggest_worry). */
.ai-options.icon-3 {
  grid-template-columns: repeat(3, 1fr);
}
.ai-options.icon-2x2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 480px) {
  .ai-options.icon-3 {
    grid-template-columns: 1fr;
  }
  /* Keep 2x2 on mobile per Jackson's V1 layout. */
}

/* -- Q9 currency-input (annuity_deposit_amount) ---------------------- */
.ai-recommendation {
  background: #fffaf0;
  border: 1px solid rgba(201, 169, 97, 0.45);
  border-left: 3px solid var(--ai-gold);
  border-radius: var(--ai-radius-md);
  padding: var(--ai-space-3) var(--ai-space-4);
  margin: var(--ai-space-4) 0 var(--ai-space-2);
  text-align: left;
}
.ai-recommendation-main {
  margin: 0 0 2px;
  font-size: 0.95rem;
  color: var(--ai-navy);
  line-height: 1.4;
}
.ai-recommendation-main strong {
  color: var(--ai-gold);
  font-weight: 700;
}
.ai-recommendation-note {
  font-size: 0.8rem;
  color: var(--ai-text-muted, #6b6b6b);
  font-weight: 500;
}
.ai-recommendation-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ai-text-muted, #6b6b6b);
  font-style: italic;
}

.ai-notice {
  background: #fffaf0;
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-left: 3px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  padding: var(--ai-space-3) var(--ai-space-4);
  margin-bottom: var(--ai-space-4);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ai-navy);
  text-align: left;
}

.ai-input-row {
  margin: var(--ai-space-3) 0 var(--ai-space-2);
}
.ai-currency-input {
  width: 100%;
  padding: 18px 20px;
  font-family: var(--ai-font-body);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ai-navy);
  background: var(--ai-paper);
  border: 2px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  outline: none;
  box-sizing: border-box;
  transition: border-color 150ms var(--ai-ease-out);
}
.ai-currency-input:focus {
  border-color: var(--ai-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}
.ai-currency-input.has-error {
  border-color: #c43b3b;
}
.ai-input-error {
  color: #c43b3b;
  font-size: 0.85rem;
  margin: 0 0 var(--ai-space-3);
  text-align: left;
}

/* -- Reveal screen ---------------------------------------------------- */
.ai-reveal {
  background: linear-gradient(135deg, var(--ai-navy-deep) 0%, var(--ai-navy) 100%);
  color: var(--ai-cream);
  border-radius: var(--ai-radius-lg);
  /* Tight padding all around -- the card hugs its content. */
  padding: var(--ai-space-6) var(--ai-space-6) var(--ai-space-5) var(--ai-space-6);
  text-align: center;
  box-shadow: var(--ai-shadow-lg);
  position: relative;
  overflow: hidden;
}
.ai-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(201, 169, 97, 0.12) 0%, transparent 60%);
  pointer-events: none;
  animation: aiRevealGlow 600ms var(--ai-ease-out);
}

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

.ai-reveal-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--ai-gold);
  color: var(--ai-navy-deep);
  border-radius: 50%;
  font-size: 1.7rem;
  margin: 0 auto var(--ai-space-3) auto;
  font-weight: 700;
  animation: aiRevealBadge 400ms var(--ai-ease-spring) both;
  animation-delay: 100ms;
}

@keyframes aiRevealBadge {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ai-reveal-header {
  font-family: var(--ai-font-display);
  font-size: clamp(1.5rem, 3.6vw, 1.95rem);
  font-weight: 700;
  margin: 0 0 var(--ai-space-3) 0;
  color: var(--ai-cream);
  opacity: 0;
  animation: aiRevealFade 350ms var(--ai-ease-out) forwards;
  animation-delay: 300ms;
}

.ai-reveal-main {
  position: relative;
  font-family: var(--ai-font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ai-cream);
  margin: 0 auto var(--ai-space-4) auto;
  max-width: 540px;
  opacity: 0;
  animation: aiRevealSlideUp 400ms var(--ai-ease-out) forwards;
  animation-delay: 500ms;
}
.ai-reveal-main em {
  font-style: italic;
  color: var(--ai-gold-soft);
}
.ai-reveal-main em strong {
  font-style: italic;
  font-weight: 800;
  color: var(--ai-cream);
}

.ai-reveal-subtitle {
  position: relative;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ai-text-on-navy);
  max-width: 560px;
  margin: 0 auto var(--ai-space-5) auto;
  opacity: 0;
  animation: aiRevealFade 400ms var(--ai-ease-out) forwards;
  animation-delay: 800ms;
}

.ai-reveal-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ai-space-3);
  background: var(--ai-gold);
  color: var(--ai-navy-deep);
  border: 2px solid var(--ai-gold);
  padding: 14px 32px;
  font-family: var(--ai-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--ai-radius-md);
  min-height: 52px;
  min-width: 240px;
  transition: transform 200ms var(--ai-ease-out),
              box-shadow 200ms var(--ai-ease-out);
  opacity: 0;
  animation: aiRevealFade 400ms var(--ai-ease-out) forwards,
             aiRevealPulse 1800ms var(--ai-ease-out) infinite;
  animation-delay: 1100ms, 1500ms;
}
.ai-reveal-cta:hover {
  background: var(--ai-gold-soft);
  transform: translateY(-2px);
}

@keyframes aiRevealFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes aiRevealSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes aiRevealPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(201, 169, 97, 0); }
}

.ai-reveal-reassurance {
  position: relative;
  margin: var(--ai-space-3) 0 0 0;
  font-size: 0.82rem;
  color: var(--ai-gold-soft);
  opacity: 0;
  animation: aiRevealFade 400ms var(--ai-ease-out) forwards;
  animation-delay: 1300ms;
}

/* -- Contact form ----------------------------------------------------- */
.ai-form {
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-lg);
  padding: var(--ai-space-7) var(--ai-space-6);
  box-shadow: var(--ai-shadow-md);
  animation: aiCardSlideIn 350ms var(--ai-ease-out) both;
}

.ai-form-header {
  font-family: var(--ai-font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-2) 0;
  letter-spacing: -0.01em;
}
.ai-form-sub {
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-6) 0;
  font-size: 1rem;
}

.ai-field {
  margin-bottom: var(--ai-space-5);
}
.ai-field-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ai-navy);
  margin-bottom: var(--ai-space-2);
}
.ai-field-input,
.ai-field-select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--ai-font-body);
  font-size: 1.05rem;
  color: var(--ai-text);
  background: var(--ai-paper);
  border: 2px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  min-height: 52px;
  transition: border-color 180ms var(--ai-ease-out),
              box-shadow 180ms var(--ai-ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.ai-field-input:focus,
.ai-field-select:focus {
  outline: none;
  border-color: var(--ai-gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15);
}
.ai-field-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%230a1f3a' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.ai-field-error {
  display: block;
  margin-top: var(--ai-space-2);
  font-size: 0.85rem;
  color: var(--ai-error);
  opacity: 0;
  transform: translateY(-2px);
  transition: all 200ms var(--ai-ease-out);
}
.ai-field.has-error .ai-field-input,
.ai-field.has-error .ai-field-select {
  border-color: var(--ai-error);
}
.ai-field.has-error .ai-field-error {
  opacity: 1;
  transform: translateY(0);
}

.ai-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ai-space-4);
}

/* Survey-question dropdown (Q5 state). Native <select> + Continue button. */
.ai-select-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--ai-space-4);
  margin-top: var(--ai-space-4);
}
.ai-select-wrap .ai-survey-select {
  width: 100%;
}
.ai-select-wrap .ai-survey-continue {
  align-self: flex-start;
}
.ai-select-wrap .ai-survey-continue:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Personalized specialty line under the advisor card credentials. */
.ai-advisor-profile-specialty {
  margin: var(--ai-space-2) 0 0;
  font-size: 0.95rem;
  color: var(--ai-text);
  line-height: 1.45;
}
@media (max-width: 480px) {
  .ai-field-row { grid-template-columns: 1fr; }
}

.ai-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ai-space-3);
  background: var(--ai-navy);
  color: var(--ai-cream);
  border: 2px solid var(--ai-navy);
  padding: 18px 32px;
  font-family: var(--ai-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--ai-radius-md);
  min-height: 60px;
  width: 100%;
  margin-top: var(--ai-space-3);
  transition: all 200ms var(--ai-ease-out);
  box-shadow: var(--ai-shadow-md);
}
.ai-form-submit:hover {
  background: var(--ai-navy-soft);
  transform: translateY(-2px);
}
.ai-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-form-privacy {
  margin-top: var(--ai-space-4);
  font-size: 0.85rem;
  color: var(--ai-text-soft);
  text-align: center;
  line-height: 1.5;
}

/* -- Footer ----------------------------------------------------------- */
.ai-footer {
  background: var(--ai-navy-deep);
  color: var(--ai-text-on-navy);
  padding: var(--ai-space-7) var(--ai-space-5);
  margin-top: auto;
}
.ai-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.ai-footer-disclaimer {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ai-text-on-navy);
  opacity: 0.85;
  margin: 0 0 var(--ai-space-4) 0;
  font-style: italic;
}
.ai-footer-meta {
  font-size: 0.8rem;
  color: var(--ai-gold-soft);
  margin: 0;
  opacity: 0.7;
}
.ai-footer-link {
  color: var(--ai-gold-soft);
  text-decoration: none;
}
.ai-footer-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -- Responsive tweaks ------------------------------------------------ */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .ai-card,
  .ai-form { padding: var(--ai-space-6) var(--ai-space-5); }
  .ai-reveal { padding: var(--ai-space-7) var(--ai-space-5); }
  .ai-cta-primary {
    width: 100%;
    min-width: 0;
  }
  .ai-trust-row {
    margin-top: var(--ai-space-6);
    gap: var(--ai-space-3);
    flex-direction: column;
    align-items: center;
  }
  /* Q-inline hero (2026-04-30) — single continuous flow, question card is */
  /* the visual focal point. Eyebrow + h1 + lede are de-emphasized so the  */
  /* question reads as the thing the visitor came to do.                   */
  .ai-hero {
    padding-top: 12px;
    padding-bottom: 24px;
  }
  .ai-eyebrow {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }
  .ai-h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    margin-bottom: 10px;
  }
  /* Lede hidden on mobile — eyebrow + h1 carry enough context, and          */
  /* dropping the lede gets the question above the fold on 375x667 phones.  */
  .ai-lede {
    display: none;
  }
  .ai-progress {
    margin-bottom: 12px;
  }
  /* Card chrome — overrides the generic .ai-card mobile padding above. The */
  /* question text is the visually-heaviest element on the page (heavier    */
  /* than the h1) so it reads as THE thing the visitor should do.           */
  .ai-card {
    padding: var(--ai-space-4) 14px;
  }
  .ai-card-question {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 8px;
  }
  .ai-card-justification {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: var(--ai-space-3);
  }
}

/* -- Reduced motion: disable everything ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -- Unqualified-path thank-you (revealed via #unqualified-thanks anchor) -- */
.unqualified-thanks { display: none; padding: 40px 20px; text-align: center; }
.unqualified-thanks:target { display: block; }

/* ===================================================================== *
 * Booking page — landscape header + above-fold calendar + below-fold    *
 * trust block (bio + stats + testimonials). Per spec §4 (line 247).     *
 * ===================================================================== */

.ai-book {
  flex: 1;
  /* tight top padding pulls the eyebrow + H1 close to the navy banner so
     the calendar sits higher above the fold on iPhone. */
  padding: var(--ai-space-3) var(--ai-space-4) var(--ai-space-5);
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 97, 0.06) 0%, transparent 60%),
    var(--ai-cream);
}
.ai-book-inner {
  max-width: 760px;
  margin: 0 auto;
  animation: aiCardSlideIn 500ms var(--ai-ease-out) both;
}

/* -- Compact landscape advisor strip (just above the calendar) ---------
 * 3-column grid: headshot | meta (1fr) | hero stat. The stat slots into
 * the upper-right white space rather than adding a vertical row, so the
 * calendar stays high above the fold. */
.ai-advisor-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--ai-space-4);
  padding: var(--ai-space-3) var(--ai-space-4);
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-lg);
  box-shadow: var(--ai-shadow-sm);
  margin: 0 0 var(--ai-space-4) 0;
}
/* Personalized tagline row spanning all 3 strip columns at the bottom.
 * Renders weaveMatchCopy() output: "{Advisor} helps {age} year old {gender}
 * who are {retired|preparing for retirement} plan for their future with
 * {intent} strategies." */
.ai-advisor-strip-tagline {
  grid-column: 1 / -1;
  margin: var(--ai-space-2) 0 0 0;
  padding-top: var(--ai-space-3);
  border-top: 1px solid var(--ai-border-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ai-text-muted);
  text-align: left;
}
.ai-advisor-strip-headshot {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--ai-gold);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ai-cream-deep);
  box-shadow: var(--ai-shadow-sm);
}
.ai-advisor-strip-headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ai-advisor-strip-meta {
  flex: 1;
  min-width: 0;
}
.ai-advisor-strip-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ai-success);
  margin: 0 0 4px 0;
}
.ai-advisor-strip-name {
  font-family: var(--ai-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0;
  letter-spacing: -0.01em;
}
.ai-advisor-strip-title {
  font-size: 0.85rem;
  color: var(--ai-gold-deep);
  font-weight: 500;
  margin: 2px 0 0 0;
}
/* Hero stat badge — vertical "200+ / Clients Assisted" block sitting in
 * the strip's right column. Gold serif number + uppercase label, divider
 * on the left to visually separate from name/creds. */
.ai-advisor-strip-stat {
  text-align: center;
  border-left: 1px solid var(--ai-border-soft);
  padding-left: var(--ai-space-4);
  flex-shrink: 0;
  max-width: 110px;
}
.ai-advisor-strip-stat-number {
  font-family: var(--ai-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ai-gold-deep);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
.ai-advisor-strip-stat-label {
  font-size: 0.68rem;
  color: var(--ai-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 4px 0 0 0;
  line-height: 1.25;
}

/* -- Booking column copy ----------------------------------------------- */

.ai-book-eyebrow {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ai-gold-deep);
  margin-bottom: var(--ai-space-2);
}
.ai-book-h1 {
  font-family: var(--ai-font-display);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-3) 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--ai-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.ai-book-h1 em {
  font-style: italic;
  color: var(--ai-gold-deep);
}
.ai-book-lede {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-4) 0;
}
@media (max-width: 600px) {
  .ai-book-lede { display: none; }
}

.ai-calendar-mount {
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-lg);
  padding: var(--ai-space-3);
  box-shadow: var(--ai-shadow-md);
  min-height: 520px;
  position: relative;
}
.ai-calendar-mount iframe {
  width: 100%;
  border: none;
  overflow: hidden;
  min-height: 680px;
  display: block;
}

.ai-book-help {
  margin-top: var(--ai-space-4);
  padding: var(--ai-space-3) var(--ai-space-4);
  background: rgba(201, 169, 97, 0.06);
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: var(--ai-radius-md);
  font-size: 0.9rem;
  color: var(--ai-text-muted);
  text-align: center;
}
.ai-book-help strong { color: var(--ai-navy); }

.ai-iframe-fallback {
  margin-top: var(--ai-space-3);
  padding: var(--ai-space-3) var(--ai-space-4);
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.45);
  border-radius: var(--ai-radius-md);
  text-align: center;
  font-size: 0.95rem;
  color: var(--ai-navy);
}
.ai-iframe-fallback strong { color: var(--ai-navy); }
.ai-iframe-fallback-link {
  color: var(--ai-navy);
  text-decoration: underline;
  font-weight: 600;
}
.ai-iframe-fallback-link:hover,
.ai-iframe-fallback-link:focus { text-decoration: none; }

/* -- Booking-page CTAs ------------------------------------------------- */

/* Thin gold text-link sitting between the advisor strip and the calendar.
 * Deliberately low-footprint so the calendar stays above the fold. Anchors
 * to #about-advisor below the calendar. */
.ai-cta-link {
  display: block;
  text-align: center;
  font-family: var(--ai-font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ai-gold-deep);
  text-decoration: none;
  padding: 6px 8px;
  margin: 0 0 var(--ai-space-3) 0;
  transition: color 150ms var(--ai-ease-out), transform 150ms var(--ai-ease-out);
}
.ai-cta-link:hover {
  color: var(--ai-navy);
  transform: translateY(1px);
}
.ai-cta-link span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 200ms var(--ai-ease-out);
}
.ai-cta-link:hover span {
  transform: translateY(2px);
}

/* Chunky pill button used after the About card and after the testimonials
 * carousel. Both anchor back to #book-calendar. Mirrors the .ai-reveal-cta
 * style language so it reads as a primary action. */
.ai-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  text-align: center;
  background: var(--ai-gold);
  color: var(--ai-navy-deep);
  border: 2px solid var(--ai-gold);
  padding: 14px 28px;
  font-family: var(--ai-font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--ai-radius-md);
  min-height: 52px;
  min-width: 240px;
  text-decoration: none;
  margin: var(--ai-space-2) 0;
  transition: transform 200ms var(--ai-ease-out),
              background 200ms var(--ai-ease-out),
              box-shadow 200ms var(--ai-ease-out);
  box-shadow: var(--ai-shadow-sm);
}
.ai-cta-button:hover {
  background: var(--ai-gold-soft);
  transform: translateY(-2px);
  box-shadow: var(--ai-shadow-md);
  color: var(--ai-navy-deep);
}

/* Give the calendar mount a top scroll-margin so the in-page anchor
 * doesn't tuck the calendar under the sticky brand header (~70px tall). */
.ai-calendar-mount { scroll-margin-top: 88px; }
#about-advisor      { scroll-margin-top: 88px; }

@media (max-width: 600px) {
  .ai-cta-link {
    font-size: 0.86rem;
    padding: 4px 8px;
    margin-bottom: var(--ai-space-2);
  }
  .ai-cta-button {
    width: 100%;
    min-width: 0;
    font-size: 0.98rem;
    padding: 13px 20px;
  }
}

/* -- Desktop tightening (>600px): pulls the calendar above the fold on
 * typical desktop viewports. Mobile is unchanged (locked by the
 * @media max-width:600px block earlier). */
@media (min-width: 601px) {
  .ai-book {
    padding-top: var(--ai-space-2);
  }
  .ai-book-eyebrow { margin-bottom: 4px; }
  .ai-book-h1 {
    /* Cap top end smaller so the H1 fits on one line at 760px container. */
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    margin-bottom: var(--ai-space-2);
  }
  .ai-book-lede { margin-bottom: var(--ai-space-3); }
  .ai-advisor-strip {
    padding: var(--ai-space-2) var(--ai-space-4);
    margin-bottom: var(--ai-space-3);
  }
  .ai-advisor-strip-headshot { width: 56px; height: 56px; }
}

/* -- Trust block (below-fold proof: bio, stats, testimonials) ---------- */

.ai-trust-block {
  margin-top: var(--ai-space-7);
  display: flex;
  flex-direction: column;
  gap: var(--ai-space-5);
}
.ai-trust-card {
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-lg);
  padding: var(--ai-space-6);
  box-shadow: var(--ai-shadow-md);
}
.ai-trust-card h2 {
  font-family: var(--ai-font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-3) 0;
  letter-spacing: -0.01em;
}

/* Centered variant — used on the About card and the testimonials card.
 * Centers the heading, body text, and (for testimonials) the bottom carousel
 * nav. The "Why people choose X" stats card opts out and stays left-aligned. */
.ai-trust-card--centered { text-align: center; }
.ai-trust-card--centered h2 { text-align: center; }

/* Header row inside a trust card — title left, carousel arrows right.
 * Used on the testimonials section; other trust cards keep the bare h2. */
.ai-trust-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ai-space-3);
  margin-bottom: var(--ai-space-3);
}
.ai-trust-card-header h2 { margin: 0; }

.ai-carousel-nav {
  display: flex;
  gap: var(--ai-space-2);
  flex-shrink: 0;
}
/* Bottom-centered nav — used when the arrows live below the testimonials
 * track instead of in the card header. */
.ai-carousel-nav--bottom {
  justify-content: center;
  margin-top: var(--ai-space-4);
}
.ai-carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ai-gold-soft);
  background: var(--ai-paper);
  color: var(--ai-navy);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* visual hairline below the centerline for the chevron glyph */
  padding-bottom: 3px;
  transition: background 150ms var(--ai-ease-out),
              border-color 150ms var(--ai-ease-out),
              color 150ms var(--ai-ease-out),
              transform 150ms var(--ai-ease-out);
}
.ai-carousel-arrow:hover {
  background: var(--ai-cream-deep);
  border-color: var(--ai-gold);
  color: var(--ai-gold-deep);
}
.ai-carousel-arrow:active {
  transform: scale(0.94);
}
.ai-carousel-arrow:focus-visible {
  outline: 2px solid var(--ai-gold);
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .ai-carousel-arrow { width: 32px; height: 32px; font-size: 1.3rem; }
}
.ai-trust-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-3) 0;
}
.ai-trust-card p:last-child { margin-bottom: 0; }

.ai-stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ai-stat-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--ai-space-3);
  padding: var(--ai-space-2) 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ai-text-muted);
}
.ai-stat-list li::before {
  content: '\2713';
  color: var(--ai-gold-deep);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 2px;
}

/* Carousel track — horizontal scroll-snap, native swipe on mobile, mouse-drag
 * on desktop, peek of the next card to signal "more this way". No JS. */
.ai-testimonials-track {
  display: flex;
  gap: var(--ai-space-3);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--ai-space-3);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* breathing room below for the slim scrollbar */
  padding: var(--ai-space-2) 0 var(--ai-space-3);
  /* slim scrollbars where supported (Firefox; WebKit handles via ::-webkit-scrollbar below) */
  scrollbar-width: thin;
  scrollbar-color: var(--ai-gold-soft) transparent;
}
.ai-testimonials-track::-webkit-scrollbar {
  height: 6px;
}
.ai-testimonials-track::-webkit-scrollbar-thumb {
  background: var(--ai-gold-soft);
  border-radius: 999px;
}
.ai-testimonials-track::-webkit-scrollbar-track {
  background: transparent;
}

.ai-testimonial {
  /* Slide width: ~86% on mobile (peek of neighbor), 2-up on desktop. */
  flex: 0 0 86%;
  scroll-snap-align: start;
  margin: 0;

  background: var(--ai-cream-deep);
  border: 1px solid var(--ai-border-soft);
  border-top: 3px solid var(--ai-gold);
  border-radius: var(--ai-radius-md);
  padding: var(--ai-space-4) var(--ai-space-4) var(--ai-space-3);
  box-shadow: var(--ai-shadow-sm);

  display: flex;
  flex-direction: column;
}
@media (min-width: 700px) {
  .ai-testimonial {
    flex: 0 0 calc(50% - var(--ai-space-3) / 2);
  }
}
@media (min-width: 1000px) {
  .ai-testimonial {
    flex: 0 0 calc(33.333% - var(--ai-space-3) * 2 / 3);
  }
}

.ai-testimonial-quote {
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-3) 0;
  padding: 0;
  flex: 1;
}
.ai-testimonial-attrib-row {
  display: flex;
  align-items: center;
  gap: var(--ai-space-3);
  margin: 0;
}
.ai-testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ai-gold-soft);
  flex-shrink: 0;
}
.ai-testimonial-avatar--initials {
  background: var(--ai-navy);
  color: var(--ai-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ai-font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.ai-testimonial-attrib { margin: 0; }
.ai-testimonial-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ai-navy);
  margin: 0;
  line-height: 1.2;
}
.ai-testimonial-role {
  font-size: 0.8rem;
  color: var(--ai-text-soft);
  margin: 2px 0 0 0;
  line-height: 1.2;
}

/* -- Mobile compaction (≤600px): pull the calendar higher above the fold */
@media (max-width: 600px) {
  .ai-book {
    /* even tighter top padding so the H1 sits right under the navy banner */
    padding-top: var(--ai-space-2);
  }
  /* Eyebrow is redundant on mobile — H1 ("You're a great fit for Jon")
     already signals personalization. Drop it to reclaim ~28px. */
  .ai-book-eyebrow { display: none; }
  .ai-book-h1 {
    margin-bottom: var(--ai-space-3);
    font-size: 1.35rem;
  }
  .ai-advisor-strip {
    padding: var(--ai-space-2) var(--ai-space-3);
    margin-bottom: var(--ai-space-3);
    gap: var(--ai-space-3);
  }
  .ai-advisor-strip-headshot {
    width: 52px;
    height: 52px;
    border-width: 2px;
  }
  .ai-advisor-strip-name { font-size: 1.05rem; }
  .ai-advisor-strip-title { font-size: 0.8rem; }
  /* Mobile: shrink the stat badge so name/creds keep their breathing room */
  .ai-advisor-strip-stat {
    padding-left: var(--ai-space-3);
    max-width: 84px;
  }
  .ai-advisor-strip-stat-number { font-size: 1.2rem; }
  .ai-advisor-strip-stat-label { font-size: 0.62rem; letter-spacing: 0.05em; }
  .ai-advisor-strip-tagline {
    font-size: 0.88rem;
    line-height: 1.4;
    padding-top: var(--ai-space-2);
    margin-top: var(--ai-space-2);
  }
  .ai-calendar-mount {
    padding: var(--ai-space-2);
    min-height: 460px;
  }
}

/* ===================================================================== *
 * Post-booking page — warm rapport surface after a successful booking.  *
 * Same brand chrome, larger casual headshot, bio + "what to expect"     *
 * block.                                                                *
 * ===================================================================== */

.ai-postbook {
  flex: 1;
  padding: var(--ai-space-7) var(--ai-space-5);
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 97, 0.06) 0%, transparent 60%),
    var(--ai-cream);
}
.ai-postbook-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  animation: aiCardSlideIn 500ms var(--ai-ease-out) both;
}
.ai-postbook-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ai-success);
  background: rgba(21, 128, 61, 0.1);
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: var(--ai-space-4);
}
.ai-postbook-h1 {
  font-family: var(--ai-font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-5) 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.ai-postbook-h1 em {
  font-style: italic;
  color: var(--ai-gold-deep);
}
.ai-postbook-h1 .ai-postbook-phone {
  color: var(--ai-gold-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--ai-gold);
  white-space: nowrap;
}
.ai-postbook-h1 .ai-postbook-phone:hover,
.ai-postbook-h1 .ai-postbook-phone:focus {
  color: var(--ai-navy);
  border-bottom-color: var(--ai-navy);
}
.ai-postbook-headshot {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto var(--ai-space-5) auto;
  border: 4px solid var(--ai-gold);
  overflow: hidden;
  box-shadow: var(--ai-shadow-lg);
  background: var(--ai-cream-deep);
}
.ai-postbook-headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ai-postbook-card {
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-lg);
  padding: var(--ai-space-6);
  box-shadow: var(--ai-shadow-md);
  text-align: left;
  margin-bottom: var(--ai-space-5);
}
.ai-postbook-card h3 {
  font-family: var(--ai-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-3) 0;
}
.ai-postbook-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-3) 0;
}
.ai-postbook-card p:last-child { margin-bottom: 0; }
.ai-postbook-next {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ai-postbook-next li {
  display: flex;
  align-items: flex-start;
  gap: var(--ai-space-3);
  padding: var(--ai-space-3) 0;
  border-bottom: 1px solid var(--ai-border-soft);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ai-text-muted);
}
.ai-postbook-next li:last-child { border-bottom: none; }
.ai-postbook-next li::before {
  content: '\2713';
  color: var(--ai-gold-deep);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 2px;
}

/* -- Phone OTP verification (flag-gated; only rendered when OTP_ENABLED) -- */
.ai-otp-disclosure {
  font-size: 0.85rem;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-2) 0;
  line-height: 1.45;
}
.ai-otp-phone-row {
  display: flex;
  gap: var(--ai-space-3);
  align-items: stretch;
}
.ai-otp-phone-row .ai-field-input {
  flex: 1 1 auto;
  min-width: 0;
}
.ai-otp-send-btn,
.ai-otp-resend-btn,
.ai-otp-edit-btn {
  font-family: var(--ai-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 var(--ai-space-4);
  min-height: 52px;
  border-radius: var(--ai-radius-md);
  background: var(--ai-navy);
  color: var(--ai-cream);
  border: 2px solid var(--ai-navy);
  cursor: pointer;
  transition: background-color 180ms var(--ai-ease-out),
              opacity 180ms var(--ai-ease-out);
  white-space: nowrap;
}
.ai-otp-send-btn:hover,
.ai-otp-resend-btn:hover,
.ai-otp-edit-btn:hover {
  background: var(--ai-navy-soft);
}
.ai-otp-send-btn:disabled,
.ai-otp-resend-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ai-otp-edit-btn {
  background: transparent;
  color: var(--ai-navy);
  border-color: var(--ai-border);
}
.ai-otp-edit-btn:hover {
  background: var(--ai-cream-deep);
  color: var(--ai-navy);
}
.ai-otp-resend-btn {
  background: transparent;
  color: var(--ai-navy);
  border-color: var(--ai-border);
}
.ai-otp-resend-btn:hover {
  background: var(--ai-cream-deep);
}

.ai-otp-code-block {
  margin-top: var(--ai-space-4);
  padding: var(--ai-space-4);
  background: var(--ai-cream-deep);
  border-radius: var(--ai-radius-md);
  border: 1px solid var(--ai-border-soft);
}
.ai-otp-code-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-family: 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  color: var(--ai-text);
  background: var(--ai-paper);
  border: 2px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  min-height: 56px;
  margin-top: var(--ai-space-2);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 180ms var(--ai-ease-out),
              box-shadow 180ms var(--ai-ease-out);
}
.ai-otp-code-input:focus {
  outline: none;
  border-color: var(--ai-gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15);
}
.ai-otp-actions {
  display: flex;
  gap: var(--ai-space-3);
  margin-top: var(--ai-space-3);
}
.ai-otp-actions .ai-otp-resend-btn,
.ai-otp-actions .ai-otp-edit-btn {
  flex: 1 1 0;
  min-height: 44px;
  font-size: 0.9rem;
}

.ai-otp-error {
  display: block;
  margin-top: var(--ai-space-2);
  font-size: 0.85rem;
  color: var(--ai-error);
  min-height: 1.2em;
}

.ai-otp-verified[hidden] {
  display: none;
}
.ai-otp-verified {
  display: flex;
  align-items: center;
  gap: var(--ai-space-3);
  margin-top: var(--ai-space-3);
  padding: var(--ai-space-3) var(--ai-space-4);
  background: rgba(21, 128, 61, 0.08);
  border: 1px solid rgba(21, 128, 61, 0.25);
  border-radius: var(--ai-radius-md);
}
.ai-otp-verified-icon {
  color: var(--ai-success);
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-otp-verified-phone {
  color: var(--ai-text);
  font-weight: 600;
  flex: 1 1 auto;
}
.ai-otp-verified .ai-otp-edit-btn {
  min-height: 36px;
  padding: 0 var(--ai-space-3);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .ai-otp-phone-row {
    flex-direction: column;
  }
  .ai-otp-send-btn {
    width: 100%;
  }
}

/* =========================================================================
   Preassign-advisor block — named match-copy hero above the PII form.
   Card (when advisor resolved) + report tease ribbon. Falls back to a
   generic tease (same ribbon, no card) when the EF returns null.
   ========================================================================= */
.ai-preassign-block {
  margin-bottom: 14px;
}

.ai-advisor-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #d4a017;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ai-advisor-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.ai-advisor-meta {
  min-width: 0;
}

.ai-advisor-label {
  font-size: 11px;
  color: #b8860b;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ai-advisor-name {
  font-weight: 700;
  font-size: 15px;
  margin-top: 1px;
}

.ai-advisor-creds {
  font-size: 11px;
  color: #777;
  line-height: 1.4;
}

.ai-report-tease {
  padding: 12px 14px;
  background: #fff8e8;
  border-left: 3px solid #d4a017;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
}

/* Identical baseline today; reserved for future divergence (e.g., dim
   styling when no advisor card precedes the tease). */
.ai-report-tease-generic {
  /* intentionally empty */
}

/* =========================================================================
   Hero-copy hide on PII step.
   Driven by body.ai-pii-mode (set by contact-form.js render()). Hides only
   the H1 + lede; the survey progress bar + survey/contact mount + privacy
   + trust row stay visible.
   ========================================================================= */
body.ai-pii-mode [data-hero-copy] {
  display: none !important;
}

/* Hide the 3-checkmark trust row once we're on the PII step. The rich
   advisor profile rendered below the form replaces this trust signal. */
body.ai-pii-mode [data-trust-row] {
  display: none !important;
}

/* =========================================================================
   Matching loader (survey-end -> PII transition).
   ~1.5s spinner + "Finding the perfect match for you..." copy. Also gives
   the preassign-advisor EF time to resolve so the PII form opens with the
   named advisor already in place.
   ========================================================================= */
.ai-matching-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}
.ai-matching-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(10, 31, 58, 0.15);
  border-top-color: #d4a017;
  border-radius: 50%;
  animation: ai-matching-spin 0.9s linear infinite;
  margin-bottom: 16px;
}
@keyframes ai-matching-spin {
  to { transform: rotate(360deg); }
}
.ai-matching-copy {
  font-size: 15px;
  color: #0a1f3a;
  font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
  .ai-matching-spinner { animation: none; }
}

/* =========================================================================
   Inline matchmaker loader (survey-end -> PII transition, 2.5s).
   Lifted from web/public/matchmaker-loading-page/index.html so the inline
   transition matches the standalone matchmaker page visually + behaviorally.
   Uses the .ai-matchmaker-* class namespace verbatim so future changes to the
   standalone page can be cross-referenced 1:1.
   ========================================================================= */
.ai-matchmaker {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ai-space-7) var(--ai-space-5);
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 97, 0.08) 0%, transparent 60%),
    var(--ai-cream);
  border-radius: var(--ai-radius-md);
}
.ai-matchmaker-inner {
  max-width: 540px;
  text-align: center;
  width: 100%;
}
.ai-matchmaker-spinner {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto var(--ai-space-6);
}
.ai-matchmaker-spinner::before,
.ai-matchmaker-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
.ai-matchmaker-spinner::before {
  border-top-color: var(--ai-gold);
  border-right-color: var(--ai-gold);
  animation: aiMatchmakerSpin 1.4s linear infinite;
}
.ai-matchmaker-spinner::after {
  inset: 12px;
  border: 2px solid transparent;
  border-bottom-color: var(--ai-navy);
  border-left-color: var(--ai-navy);
  animation: aiMatchmakerSpin 1.8s linear infinite reverse;
}
@keyframes aiMatchmakerSpin {
  to { transform: rotate(360deg); }
}
.ai-matchmaker-h {
  font-family: var(--ai-font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--ai-navy);
  margin: 0 0 var(--ai-space-3) 0;
  letter-spacing: -0.01em;
}
.ai-matchmaker-status {
  font-size: 1.05rem;
  color: var(--ai-text-muted);
  margin: 0 0 var(--ai-space-6) 0;
  min-height: 28px;
  transition: opacity 300ms var(--ai-ease-out);
}
.ai-matchmaker-steps {
  display: flex;
  flex-direction: column;
  gap: var(--ai-space-3);
  max-width: 360px;
  margin: 0 auto;
  text-align: left;
}
.ai-matchmaker-step {
  display: flex;
  align-items: center;
  gap: var(--ai-space-3);
  padding: var(--ai-space-3) var(--ai-space-4);
  background: var(--ai-paper);
  border: 1px solid var(--ai-border-soft);
  border-radius: var(--ai-radius-md);
  box-shadow: var(--ai-shadow-sm);
  opacity: 0.4;
  transition: all 350ms var(--ai-ease-out);
}
.ai-matchmaker-step.active {
  opacity: 1;
  border-color: var(--ai-gold);
}
.ai-matchmaker-step.done {
  opacity: 1;
  border-color: var(--ai-success);
  background: rgba(21, 128, 61, 0.04);
}
.ai-matchmaker-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ai-cream-deep);
  color: var(--ai-text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-matchmaker-step.active .ai-matchmaker-step-icon {
  background: var(--ai-gold);
  color: var(--ai-navy-deep);
}
.ai-matchmaker-step.done .ai-matchmaker-step-icon {
  background: var(--ai-success);
  color: var(--ai-cream);
}
.ai-matchmaker-step-label {
  font-size: 0.95rem;
  color: var(--ai-navy);
  font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
  .ai-matchmaker-spinner::before,
  .ai-matchmaker-spinner::after { animation: none; }
  .ai-matchmaker-step { transition: none; }
}

/* =========================================================================
   Advisor profile (PII step, below the submit button).
   Rich profile that mirrors the booking page's advisor card. Renders only
   when preassign-advisor returned a non-null advisor. Each subsection
   (bio, stats, testimonials) is conditionally rendered so partial advisor
   data degrades gracefully.
   ========================================================================= */
.ai-advisor-profile {
  margin-top: 20px;
  padding: 20px 18px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}
.ai-advisor-profile-header {
  font-size: 15px;
  font-weight: 600;
  color: #0a1f3a;
  margin: 0 0 14px;
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.ai-advisor-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ececec;
  text-align: center;
}
.ai-advisor-profile-headshot img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.ai-advisor-profile-meta {
  min-width: 0;
  text-align: center;
}
.ai-advisor-profile-name {
  font-size: 16px;
  font-weight: 700;
  color: #0a1f3a;
  margin: 0;
  line-height: 1.25;
}
.ai-advisor-profile-credentials {
  font-size: 13px;
  color: #555;
  margin: 4px 0 0;
  line-height: 1.4;
}
.ai-advisor-profile-stats {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  text-align: center;
}
.ai-advisor-profile-stats li {
  font-size: 13px;
  color: #0a1f3a;
  padding-left: 18px;
  position: relative;
}
.ai-advisor-profile-stats li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #d4a017;
  font-weight: 700;
}
.ai-advisor-profile-bio {
  font-size: 14px;
  color: #333;
  line-height: 1.55;
  margin: 14px 0 0;
  text-align: center;
}
.ai-advisor-profile-testimonials {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #ececec;
}
.ai-advisor-profile-subhead {
  font-size: 13px;
  font-weight: 600;
  color: #0a1f3a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}
.ai-advisor-profile-testimonial {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
}
.ai-advisor-profile-testimonial:last-child { margin-bottom: 0; }
.ai-advisor-profile-testimonial blockquote {
  font-size: 13px;
  color: #333;
  line-height: 1.55;
  margin: 0 0 8px;
  font-style: italic;
}
.ai-advisor-profile-testimonial figcaption { margin: 0; }
.ai-advisor-profile-testimonial-name {
  font-size: 13px;
  font-weight: 600;
  color: #0a1f3a;
  margin: 0;
}
.ai-advisor-profile-testimonial-role {
  font-size: 12px;
  color: #777;
  margin: 2px 0 0;
}

/* Testimonial card with optional avatar (AI-generated portrait). When
   an avatar is present, the card becomes a 2-col row: portrait on the
   left, quote + attribution on the right. Without an avatar, the card
   keeps the existing column layout. */
.ai-advisor-profile-testimonial.has-avatar {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ai-advisor-profile-testimonial-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ai-cream-deep, #f3ead4);
  border: 1px solid #ececec;
}
.ai-advisor-profile-testimonial-body {
  flex: 1 1 auto;
  min-width: 0;
}

/* Fine-print disclosure when illustrative photos are used. Stays
   proximate to the testimonials block (compliance "clear and
   conspicuous" guidance) but visually true fine-print: small, muted,
   tight, treated as a footnote. */
.ai-advisor-profile-testimonial-disclosure {
  margin: 10px 0 0;
  font-size: 10px;
  font-style: italic;
  color: #aaa;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.01em;
}
.ai-advisor-profile-claim-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 14px 0 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: #0a1f3a;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 31, 58, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.ai-advisor-profile-claim-cta::after {
  content: "→";
  margin-left: 8px;
  font-size: 16px;
  line-height: 1;
}
.ai-advisor-profile-claim-cta:hover {
  background: #12345f;
  box-shadow: 0 8px 18px rgba(10, 31, 58, 0.22);
  transform: translateY(-1px);
}
.ai-advisor-profile-claim-cta:focus-visible {
  outline: 3px solid rgba(212, 160, 23, 0.55);
  outline-offset: 2px;
}
.ai-advisor-profile-claim-cta:active {
  transform: translateY(0);
}

/* Headshot fallback: when no headshot URL is present (generic /
   preassign-EF-empty path), the slot renders a centered person glyph
   inside the same circle as the real headshot. */
.ai-advisor-profile-headshot-fallback {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ai-cream-deep, #f3ead4);
  color: var(--ai-text-muted, #777);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
}

/* Collapsible "More about <Name>" accordion below the identity card.
   Hides bio + stats + testimonials behind a single tap so the PII screen
   stays compact above the form. */
.ai-advisor-profile-more {
  margin-top: 14px;
}
.ai-advisor-profile-more > summary {
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: #0a1f3a;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ai-advisor-profile-more > summary:hover {
  background: #f7f1e0;
  border-color: #d4a017;
}
.ai-advisor-profile-more > summary:focus-visible {
  outline: 3px solid rgba(212, 160, 23, 0.45);
  outline-offset: 2px;
}
.ai-advisor-profile-more > summary::-webkit-details-marker { display: none; }
.ai-advisor-profile-more > summary::after {
  content: "▾";
  color: #b8860b;
  font-size: 12px;
  transition: transform 0.18s ease;
}
.ai-advisor-profile-more[open] > summary::after {
  transform: rotate(180deg);
}
.ai-advisor-profile-more-body {
  padding-top: 4px;
}
/* When inside the accordion body, the first stat/bio block shouldn't
   double-up the top margin from its standalone styling. */
.ai-advisor-profile-more-body > :first-child {
  margin-top: 8px;
}

/* =========================================================================
   Post-submit transition overlay.
   Briefly covers the PII page after a successful submit, naming the
   advisor before the redirect to the booking page fires. ~1.2s.
   ========================================================================= */
.ai-post-submit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  animation: ai-post-submit-fade 0.25s ease-out both;
}
@keyframes ai-post-submit-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ai-post-submit-card {
  max-width: 380px;
  text-align: center;
}
.ai-post-submit-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(10, 31, 58, 0.15);
  border-top-color: #d4a017;
  border-radius: 50%;
  animation: ai-matching-spin 0.9s linear infinite;
  margin: 0 auto 18px;
}
.ai-post-submit-copy {
  font-size: 16px;
  color: #0a1f3a;
  line-height: 1.5;
  margin: 0;
}
.ai-post-submit-copy strong { color: #0a1f3a; }
@media (prefers-reduced-motion: reduce) {
  .ai-post-submit-spinner { animation: none; }
  .ai-post-submit-overlay { animation: none; }
}

/* =========================================================================
   Confetti + Congrats card (PII screen reveal moment).
   Replaces the previous report-tease ribbon. Confetti is CSS-only: a small
   absolutely-positioned layer of falling colored squares behind the
   congrats card. No external library, no JS animation loop. Runs ~2.4s
   then settles. Honors prefers-reduced-motion.
   ========================================================================= */
.ai-confetti {
  position: relative;
  height: 0;
  pointer-events: none;
  overflow: visible;
}

.ai-confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 12px;
  border-radius: 1px;
  opacity: 0;
  animation: ai-confetti-fall 2.4s ease-out forwards;
}

@keyframes ai-confetti-fall {
  0%   { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(var(--ai-confetti-dx, 0), 180px, 0) rotate(540deg); opacity: 0; }
}

/* 14 pieces, deterministic positions/colors/delays so the effect feels
   intentional, not random. Colors pulled from the apex palette: gold,
   navy, cream, plus one supporting green for celebratory contrast. */
.ai-confetti-piece-0  { left:  4%; background: #c9a961; --ai-confetti-dx:  18px; animation-delay: 0.00s; }
.ai-confetti-piece-1  { left: 12%; background: #0a1f3a; --ai-confetti-dx: -22px; animation-delay: 0.10s; }
.ai-confetti-piece-2  { left: 20%; background: #d4a017; --ai-confetti-dx:  10px; animation-delay: 0.05s; }
.ai-confetti-piece-3  { left: 28%; background: #2e8b57; --ai-confetti-dx: -14px; animation-delay: 0.20s; }
.ai-confetti-piece-4  { left: 36%; background: #c9a961; --ai-confetti-dx:  24px; animation-delay: 0.15s; }
.ai-confetti-piece-5  { left: 44%; background: #0a1f3a; --ai-confetti-dx:  -8px; animation-delay: 0.30s; }
.ai-confetti-piece-6  { left: 52%; background: #d4a017; --ai-confetti-dx:  16px; animation-delay: 0.08s; }
.ai-confetti-piece-7  { left: 60%; background: #2e8b57; --ai-confetti-dx: -20px; animation-delay: 0.25s; }
.ai-confetti-piece-8  { left: 68%; background: #c9a961; --ai-confetti-dx:   6px; animation-delay: 0.12s; }
.ai-confetti-piece-9  { left: 76%; background: #0a1f3a; --ai-confetti-dx: -16px; animation-delay: 0.18s; }
.ai-confetti-piece-10 { left: 84%; background: #d4a017; --ai-confetti-dx:  22px; animation-delay: 0.04s; }
.ai-confetti-piece-11 { left: 92%; background: #2e8b57; --ai-confetti-dx: -10px; animation-delay: 0.22s; }
.ai-confetti-piece-12 { left: 16%; background: #d4a017; --ai-confetti-dx:  14px; animation-delay: 0.35s; }
.ai-confetti-piece-13 { left: 80%; background: #c9a961; --ai-confetti-dx: -18px; animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .ai-confetti-piece {
    animation: none;
    opacity: 0;
  }
}

.ai-congrats-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8e8 0%, #ffffff 100%);
  border: 1px solid #d4a017;
  border-left: 4px solid #d4a017;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(212, 160, 23, 0.12);
  animation: ai-congrats-pop 0.45s ease-out 0.1s both;
  position: relative;
}

/* Clickable congrats CTA: button reset + affordances. Scrolls to the
   advisor profile section below. */
button.ai-congrats-card.ai-congrats-cta {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
button.ai-congrats-card.ai-congrats-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.22);
  border-color: #b8860b;
}
button.ai-congrats-card.ai-congrats-cta:focus-visible {
  outline: 3px solid rgba(212, 160, 23, 0.55);
  outline-offset: 2px;
}
button.ai-congrats-card.ai-congrats-cta:active {
  transform: translateY(0);
}

/* Avatar slot in the congrats card (replaces the 🎉 emoji). Circular
   crop, matches the bonus-box scale, falls back to a generic person glyph
   when no headshot URL is present. */
.ai-congrats-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2px solid #d4a017;
  box-shadow: 0 1px 3px rgba(10, 31, 58, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ai-congrats-avatar.ai-congrats-avatar-fallback {
  font-size: 30px;
  line-height: 1;
  color: #b8860b;
  background: #fff8e8;
}

@keyframes ai-congrats-pop {
  0%   { transform: scale(0.96); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1.00); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-congrats-card { animation: none; }
}

.ai-congrats-emoji {
  font-size: 28px;
  line-height: 1;
  flex: 0 0 auto;
}

/* ─── Animated Bonus Box ───────────────────────────────────────────────
   Eye-catcher above the PII fields. Coordinated animations:
   - Box: subtle scale + box-shadow pulse (2.6s)
   - Gift icon: gentle bob (2s)
   - Shimmer: diagonal gold sweep (3.8s)
   All disabled under prefers-reduced-motion. */
.ai-bonus-box {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0 0%, #fff5e0 100%);
  border: 2px solid #d4a017;
  box-shadow:
    0 0 0 0 rgba(212, 160, 23, 0.55),
    0 4px 14px rgba(212, 160, 23, 0.18);
  animation: ai-bonus-pulse 2.6s ease-in-out 0.2s infinite;
}

/* Inner clickable button — owns the row layout (icon + body + arrow). */
.ai-bonus-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 4px 2px;
  background: transparent;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.ai-bonus-cta:hover {
  background: rgba(212, 160, 23, 0.08);
  transform: translateY(-1px);
}
.ai-bonus-cta:focus-visible {
  outline: 3px solid rgba(212, 160, 23, 0.55);
  outline-offset: 2px;
}
.ai-bonus-cta:active { transform: translateY(0); }

.ai-bonus-arrow {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 700;
  color: #b8860b;
  line-height: 1;
  margin-left: 6px;
}

/* Inline spans inside .ai-bonus-body need block-level rendering so the
   label / headline / sub stack vertically inside the button. */
.ai-bonus-label,
.ai-bonus-headline,
.ai-bonus-sub { display: block; }

/* Collapsible explainer — what's in the report. Sits below the CTA
   button inside the bonus box. Closed by default; subtle chevron via
   summary marker. */
.ai-bonus-explainer {
  border-top: 1px dashed rgba(212, 160, 23, 0.45);
  padding-top: 8px;
  margin-top: 2px;
}
.ai-bonus-explainer > summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  color: #0a1f3a;
  padding: 4px 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-bonus-explainer > summary::-webkit-details-marker { display: none; }
.ai-bonus-explainer > summary::after {
  content: "↓";
  display: inline-block;
  color: #b8860b;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease;
}
.ai-bonus-explainer[open] > summary::after {
  transform: rotate(180deg);
}
.ai-bonus-explainer-list {
  list-style: none;
  padding: 8px 6px 4px;
  margin: 0;
  font-size: 13px;
  color: #2a2a2a;
  line-height: 1.5;
}
.ai-bonus-explainer-list li {
  padding: 4px 0 4px 18px;
  position: relative;
}
.ai-bonus-explainer-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #b8860b;
  font-weight: 700;
}

.ai-bonus-shimmer {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  pointer-events: none;
  animation: ai-bonus-shimmer-sweep 3.8s ease-in-out 0.6s infinite;
}

.ai-bonus-icon {
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
  animation: ai-bonus-bob 2s ease-in-out infinite;
  transform-origin: center bottom;
}

.ai-bonus-report-icon {
  position: relative;
  display: block;
  width: 42px;
  height: 52px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #fff8e7 100%);
  border: 2px solid #d4a017;
  box-shadow: 0 4px 10px rgba(10, 31, 58, 0.14);
  overflow: hidden;
}
.ai-bonus-report-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: #0a1f3a;
}
.ai-bonus-report-fold {
  position: absolute;
  right: -2px;
  top: -2px;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #f6dd92 0%, #fff7df 100%);
  border-left: 2px solid #d4a017;
  border-bottom: 2px solid #d4a017;
  border-radius: 0 0 0 5px;
}
.ai-bonus-report-title,
.ai-bonus-report-chart,
.ai-bonus-report-line {
  position: absolute;
  left: 8px;
  right: 8px;
  border-radius: 999px;
}
.ai-bonus-report-title {
  top: 18px;
  height: 3px;
  background: rgba(10, 31, 58, 0.28);
}
.ai-bonus-report-chart {
  left: 8px;
  right: auto;
  top: 28px;
  width: 26px;
  height: 10px;
  border-radius: 2px;
  background:
    linear-gradient(135deg, transparent 47%, #d4a017 48%, #d4a017 58%, transparent 59%),
    linear-gradient(90deg, rgba(212, 160, 23, 0.18), rgba(212, 160, 23, 0.32));
}
.ai-bonus-report-line {
  height: 3px;
  background: rgba(10, 31, 58, 0.24);
}
.ai-bonus-report-line-1 {
  top: 42px;
}
.ai-bonus-report-line-2 {
  top: 47px;
  right: 16px;
}

.ai-bonus-body { flex: 1 1 auto; min-width: 0; }

.ai-bonus-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #b8860b;
  background: rgba(212, 160, 23, 0.16);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.ai-bonus-headline {
  font-size: 16px;
  font-weight: 700;
  color: #0a1f3a;
  line-height: 1.25;
  margin-bottom: 4px;
}

.ai-bonus-sub {
  font-size: 13px;
  color: #4a4a4a;
  line-height: 1.45;
}

@keyframes ai-bonus-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(212, 160, 23, 0.55),
      0 4px 14px rgba(212, 160, 23, 0.18);
  }
  50% {
    transform: scale(1.015);
    box-shadow:
      0 0 0 8px rgba(212, 160, 23, 0),
      0 6px 20px rgba(212, 160, 23, 0.30);
  }
}

@keyframes ai-bonus-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@keyframes ai-bonus-shimmer-sweep {
  0%   { left: -120%; }
  60%  { left: 140%; }
  100% { left: 140%; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-bonus-box { animation: none; }
  .ai-bonus-icon { animation: none; }
  .ai-bonus-shimmer { display: none; }
}

.ai-congrats-copy {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.ai-congrats-headline {
  font-size: 15px;
  font-weight: 600;
  color: #0a1f3a;
  line-height: 1.35;
}

.ai-congrats-sub {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-top: 4px;
}
