/* ══════════════════════════════════════════════════════════════════
   DTH Design System tokens — keep in sync with Design System v1
   ══════════════════════════════════════════════════════════════════ */
:root {
  --c-surface:        #F2F6FA;
  --c-subtle:         #DCE8F2;
  --c-subtle-2:       #EFF5FB;
  --c-divider:        #B8CEE3;
  --c-muted:          #8DA8C4;
  --c-secondary:      #5A7BA0;
  --c-accent:         #3E6F9E;
  --c-accent-ink:     #2F5678;
  --c-primary:        #1F3A5C;
  --c-primary-hover:  #17304D;
  --c-success:        #3E7F6F;
  --c-success-bg:     #DEF0EA;
  --c-success-border: #B8DDD0;
  --c-warning:        #B45309;
  --c-warning-bg:     #FEF3C7;
  --c-warning-border: #F6D67E;
  --c-danger:         #B91C1C;
  --c-danger-bg:      #FEE2E2;
  --c-border:         #B8CEE3;  /* navbar/footer borders — matches c-divider */

  --font-serif:  'Source Serif 4', Georgia, serif;
  --font-sans:   'Inter', -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, Menlo, monospace;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-full: 999px;

  --shadow-sm:   0 1px 2px rgba(31,58,92,.04);
  --shadow-md:   0 4px 14px -4px rgba(31,58,92,.12);
  --shadow-lg:   0 12px 32px -8px rgba(31,58,92,.18);

  --header-h:    69px;   /* sticky header height (incl. border) — drives composer offset */
}

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--c-surface);
  color: var(--c-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════════════════════
   NAVBAR — Platform chrome (DTH design system)
   ══════════════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 100%;
  border-bottom: 1px solid rgba(184,206,227,.5);
  background: rgba(242,246,250,.86);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.navbar__inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity .15s;
  text-decoration: none;
}
.navbar__brand:hover { opacity: .80; }

.navbar__logo {
  height: 42px;
  width: auto;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-secondary);
  white-space: nowrap;
  line-height: 1;
  transition: color .15s, background .15s, border-color .15s;
  text-decoration: none;
}
.nav-link:hover { color: var(--c-primary); }
.nav-link--active {
  color: var(--c-primary);
  background: #fff;
  border-color: var(--c-divider);
}

.nav-explore {
  position: relative;
}

.nav-explore__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-secondary);
  white-space: nowrap;
  line-height: 1;
  transition: color .15s, background .15s, border-color .15s;
  cursor: pointer;
  background: none;
}
.nav-explore__btn:hover,
.nav-explore--open .nav-explore__btn {
  color: var(--c-primary);
  background: #fff;
  border-color: var(--c-divider);
}

.chevron-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform .15s;
}
.nav-explore--open .chevron-icon { transform: rotate(180deg); }

.nav-explore__bridge {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  z-index: 200;
  transition: opacity .15s, transform .15s;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}
.nav-explore--open .nav-explore__bridge {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.explore-dropdown {
  width: 660px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  box-shadow: 0 16px 48px -8px rgba(31,58,92,.18);
  overflow: hidden;
}

.explore-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(184,206,227,.6);
  background: #fff;
}

.explore-dropdown__eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-family: var(--font-sans);
}

.explore-dropdown__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  transition: color .15s;
  text-decoration: none;
}
.explore-dropdown__link:hover { color: var(--c-primary); }
.explore-dropdown__link svg { width: 14px; height: 14px; }

.explore-dropdown__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 12px;
  gap: 1px;
}

.explore-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--c-secondary);
  transition: color .1s, background .1s;
  cursor: pointer;
  text-decoration: none;
}
.explore-cat-item:hover { color: var(--c-primary); background: var(--c-subtle); }

.explore-cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(62,111,158,.3);
  flex-shrink: 0;
  transition: background .1s;
}
.explore-cat-item:hover .explore-cat-dot { background: var(--c-accent); }

.navbar__search {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  padding: 0 24px;
  min-width: 0;
}

.search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px solid var(--c-divider);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search-input-row:hover,
.search-input-row:focus-within {
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 2px 10px rgba(31,58,92,.08);
}

.search-icon { width: 14px; height: 14px; color: var(--c-muted); flex-shrink: 0; }

.search-input {
  flex: 1;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--c-primary);
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
}
.search-input::placeholder { color: var(--c-muted); }

.navbar__auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-signin {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-secondary);
  padding: 4px 8px;
  white-space: nowrap;
  transition: color .15s;
  text-decoration: none;
}
.btn-signin:hover { color: var(--c-primary); }

.btn-signup {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  background: var(--c-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-signup:hover {
  background: var(--c-primary-hover);
  box-shadow: var(--shadow-md);
}

.navbar__hamburger {
  display: none;
  padding: 8px;
  border-radius: 8px;
  color: var(--c-primary);
  transition: background .15s;
  background: none;
  border: none;
  cursor: pointer;
}
.navbar__hamburger:hover { background: var(--c-subtle); }
.navbar__hamburger svg { width: 20px; height: 20px; }

/* ── Mobile menu ─────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  border-top: 1px solid rgba(184,206,227,.5);
  background: #fff;
  padding: 16px 24px;
}
.mobile-menu.is-open { display: block; }

.mobile-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: var(--c-subtle);
  border: 1px solid var(--c-border);
  margin-bottom: 12px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-secondary);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.mobile-nav-link:hover { color: var(--c-primary); background: var(--c-subtle); }
.mobile-nav-link--active { color: var(--c-primary); background: var(--c-subtle); font-weight: 600; }

.mobile-explore-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-secondary);
  transition: color .15s, background .15s;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.mobile-explore-btn:hover { color: var(--c-primary); background: var(--c-subtle); }

.mobile-explore-children {
  display: none;
  margin-top: 4px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(184,206,227,.6);
}
.mobile-explore-children.is-open { display: block; }

.mobile-explore-children a {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--c-secondary);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.mobile-explore-children a:hover { color: var(--c-primary); background: var(--c-subtle); }

.mobile-explore-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-accent);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.mobile-explore-all:hover { background: var(--c-subtle); }

.mobile-auth-area {
  padding-top: 8px;
  border-top: 1px solid rgba(184,206,227,.3);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-btn-signin {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-secondary);
  transition: background .15s;
  text-decoration: none;
}
.mobile-btn-signin:hover { background: var(--c-subtle); }

.mobile-btn-signup {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--c-primary);
  text-align: center;
  transition: background .15s;
  text-decoration: none;
}
.mobile-btn-signup:hover { background: var(--c-primary-hover); }

/* ── Navbar responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__inner  { padding: 0 24px; gap: 12px; }
  .navbar__nav    { display: none; }
  .navbar__search { display: none; }
  .navbar__auth .btn-signin { display: none; }
  .navbar__hamburger { display: inline-flex; }
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER — Platform marketing footer (DTH design system)
   ══════════════════════════════════════════════════════════════════ */
.footer {
  width: 100%;
  background: transparent;
  border-top: 1px solid rgba(184,206,227,.5);
  /* padding-bottom offsets the fixed AI-caveat strip (~44px).
     body already reserves 44px via padding-bottom; the footer sits
     in normal flow so no extra reservation needed — the body padding
     pushes content above the strip, including this footer. */
}

.footer__main {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 38px 40px 30px;
}

.footer__grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
}

/* Brand keeps its natural (tagline) width; space-between then splits the
   remaining room into two EQUAL gaps so Brand · Company · Directory are
   equidistant, with Directory's right edge pinned to the container edge
   (= Sign-up's right edge in the header). */
.footer__brand { flex: 0 1 auto; }

.footer__logo-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  transition: opacity .15s;
  text-decoration: none;
}
.footer__logo-link:hover { opacity: .70; }

.footer__logo { height: 42px; width: auto; }

.footer__tagline {
  font-size: 14px;
  color: var(--c-secondary);
  line-height: 1.6;
  max-width: 62ch;
  margin-bottom: 16px;
}

/* Social row — monochrome, inherits currentColor (secondary → primary on hover).
   No platform brand colors. 40px tap targets; -10px left margin optically aligns
   the first glyph with the logo. */
.footer__social {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: -10px;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  color: var(--c-secondary);
  transition: color .15s;
}
.footer__social a:hover { color: var(--c-primary); }
.footer__social svg { width: 18px; height: 18px; display: block; }

.footer__col-heading {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 14px;
}

.footer__links { display: flex; flex-direction: column; gap: 9px; }

.footer__link {
  font-size: 13.5px;
  color: var(--c-secondary);
  transition: color .15s;
  text-decoration: none;
}
.footer__link:hover { color: var(--c-primary); }

.footer__bottom {
  border-top: 1px solid rgba(184,206,227,.4);
}

.footer__bottom-inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer__copyright {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.footer__bottom-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__bottom-link {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: color .15s;
  text-decoration: none;
}
.footer__bottom-link:hover { color: var(--c-primary); }

/* Footer responsive */
@media (max-width: 768px) {
  .footer__main  { padding: 38px 24px 30px; }
  .footer__grid  { gap: 32px; }
  .footer__brand { flex: 1 1 100%; }
  .footer__bottom-inner { padding: 20px 24px; }
}

@media (max-width: 480px) {
  .footer__grid  { flex-direction: column; }
}

/* BETA pill next to the brand logo. Cursor:help reveals the tooltip
   that explains the AI caveat. */
.brand-beta-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: var(--c-accent);
  border-radius: 4px;
  cursor: help;
  user-select: none;
  line-height: 1.4;
}
/* BETA moved off the brand logo (platform header has none there) to the Mola
   hero identity — ties the beta caveat to Mola, not the DTH brand. */
.mola-beta-pill { vertical-align: middle; margin-left: 7px; }

/* Sticky AI caveat strip pinned to the bottom of the viewport. Always
   visible so the buyer doesn't forget Mola is AI. Styled to match the
   platform cookie banner: white bar, left badge + grey caveat, navy
   "Got it" pill on the right. Dismissible per browser session. */
.app-footer-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: #fff;
  border-top: 1px solid var(--c-divider);
  box-shadow: 0 -2px 12px -6px rgba(31, 58, 92, .12);
  font-size: 13px;
  color: var(--c-secondary);
}
.app-footer-strip__inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 40px;
}
.app-footer-strip .footer-beta {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: .08em;
  color: #fff;
  background: var(--c-accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.app-footer-strip .footer-caveat { line-height: 1.5; }
.app-footer-strip .footer-caveat a {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.app-footer-strip .footer-caveat a:hover { color: var(--c-accent); }
.app-footer-strip .footer-dismiss {
  margin-left: auto;
  flex-shrink: 0;
  padding: 7px 22px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--c-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease;
}
.app-footer-strip .footer-dismiss:hover { background: var(--c-primary-hover); }
.app-footer-strip.is-dismissed { display: none; }
/* Reserve bottom space so the strip never overlaps actual content
   (no-JS fallback; the inline script sets the exact rendered height). */
body { padding-bottom: 52px; }
body.footer-dismissed { padding-bottom: 0; }

/* Mobile: drop the verbose verify tail + tighten so the bar stays ~1 line.
   Core "Mola is AI — outputs can be wrong." warning + Got it pill remain. */
@media (max-width: 480px) {
  .app-footer-strip { font-size: 12px; }
  .app-footer-strip__inner { padding: 9px 24px; gap: 10px; }
  .app-footer-strip .footer-caveat-more { display: none; }
  .app-footer-strip .footer-dismiss { padding: 6px 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ══════════════════════════════════════════════════════════════════ */
main {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
#hero {
  text-align: center;
  padding: 24px 20px 24px;
}

.mola-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.mola-icon {
  display: inline-block;
  color: var(--c-primary);
  flex-shrink: 0;
}
.mola-icon-sm {
  width: 22px;
  height: 28px;
  color: var(--c-accent);
  animation: mola-breathe 3.5s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.mola-icon-xs {
  width: 14px;
  height: 18px;
  color: var(--c-accent);
  flex-shrink: 0;
}
@keyframes mola-breathe {
  0%, 100% { transform: scale(1)    translateY(0); }
  50%      { transform: scale(1.03) translateY(-1px); }
}

/* ══════════════════════════════════════════════════════════════════
   MOLA — rich SVG character (hero + composer instances)
   State machine driven by [data-state] = idle | typing | thinking | speaking
   ══════════════════════════════════════════════════════════════════ */

.mola-rich {
  display: block;
  flex-shrink: 0;
  overflow: visible;
}
.mola-rich-hero {
  width: 180px;
  height: 210px;
  margin-bottom: 4px;
  filter: drop-shadow(0 10px 22px rgba(31,58,92,.18));
}
.mola-rich-composer {
  width: 48px;
  height: 56px;
  align-self: flex-end;
  margin: 0 2px -4px 4px;     /* nudge: a hair of left padding, sit on composer floor */
  filter: drop-shadow(0 3px 6px rgba(31,58,92,.18));
}
.mola-rich-bubble {
  opacity: 0.88;              /* historical / transcript feel — composer Mola is the active speaker */
}
/* Bubbles are static — composer Mola owns idle-breathe / blink / thinking /
   speaking animations. Bubbles inherit the full geometry (so the markup is
   single-source via the Jinja partial) but suppress per-state animations
   here so a long conversation isn't a wall of breathing avatars. */
.mola-rich-bubble .mola-body-group,
.mola-rich-bubble .mola-lid,
.mola-rich-bubble .mola-hat,
.mola-rich-bubble .mola-pupil,
.mola-rich-bubble .mola-brow,
.mola-rich-bubble .mola-hand,
.mola-rich-bubble .mola-mouth { animation: none !important; }

/* Smooth transitions between states for parts that aren't always animating */
.mola-rich .mola-lid    { transform: scaleY(0); transition: transform 220ms ease; }
.mola-rich .mola-pupil  { transition: transform 260ms ease; }
.mola-rich .mola-brow   { transition: transform 220ms ease; }
.mola-rich .mola-hat    { transition: transform 320ms ease; }

/* Mouth visibility — closed by default, alternates revealed in speaking state */
.mola-rich .mola-mouth-o { display: none; }

/* Cap DTH text — sized per host so it stays legible after downscaling.
   Hero renders at ~75% scale; composer/bubble at ~20%, so the text needs
   to be ~2× larger in viewBox units there to read on screen. */
.mola-rich-composer .mola-cap-text,
.mola-rich-bubble   .mola-cap-text { font-size: 32px; letter-spacing: -0.8px; }

/* ── IDLE: gentle breathing + slow blink + hat wobble ─────────────── */
.mola-rich[data-state="idle"] .mola-body-group {
  animation: mola-breathe-rich 3.8s ease-in-out infinite;
}
.mola-rich[data-state="idle"] .mola-lid {
  animation: mola-blink 5.5s ease-in-out infinite;
}
.mola-rich[data-state="idle"] .mola-hat {
  animation: mola-hat-wobble 4.2s ease-in-out infinite;
  transform-origin: 122px 50px;
}

@keyframes mola-hat-wobble {
  0%,100% { transform: rotate(-2deg); }
  50%     { transform: rotate( 2deg); }
}

@keyframes mola-breathe-rich {
  0%, 100% { transform: scale(1)     translateY(0); }
  50%      { transform: scale(1.022) translateY(-2px); }
}
@keyframes mola-blink {
  0%, 92%, 100% { transform: scaleY(0); }
  95%, 96.5%    { transform: scaleY(1); }
}

/* ── TYPING: lids half-close, pupils glance toward textarea (right+down),
       hat tilts slightly toward the cursor ─────────────────────────── */
.mola-rich[data-state="typing"] .mola-lid {
  transform: scaleY(0.55);
}
.mola-rich[data-state="typing"] .mola-pupil {
  transform: translate(3px, 2px);
}
.mola-rich[data-state="typing"] .mola-brow-l {
  transform: translateY(2px) rotate(-3deg);
}
.mola-rich[data-state="typing"] .mola-brow-r {
  transform: translateY(2px) rotate(3deg);
}
.mola-rich[data-state="typing"] .mola-hat {
  transform: rotate(5deg) translateY(-1px);
  transform-origin: 122px 50px;
}

/* ── THINKING: whole-body sway — Mola gently rocks side-to-side around
       her base while one hand lifts toward the cheek in a "pondering"
       gesture. Body breath is rolled into the sway so the figure still
       has rhythm. Brows knit, blink slows. Whole-body motion is the
       only thing that reads at composer scale (48px) — sub-pixel cap
       rotation or pupil shifts blur the DTH text and tiny pupils into
       invisibility at that size, so we move the entire figure instead.
       Pivot is `transform-origin: 120px 260px` set inline on the body
       group (her base). ────── */
.mola-rich[data-state="thinking"] .mola-body-group {
  animation: mola-think-sway 2.4s ease-in-out infinite;
}
.mola-rich[data-state="thinking"] .mola-hand-l {
  animation: mola-think-hand 2.4s ease-in-out infinite;
}
.mola-rich[data-state="thinking"] .mola-lid {
  animation: mola-blink 4s ease-in-out infinite;
}
.mola-rich[data-state="thinking"] .mola-brow-l {
  animation: mola-brow-think-l 2.4s ease-in-out infinite;
}
.mola-rich[data-state="thinking"] .mola-brow-r {
  animation: mola-brow-think-r 2.4s ease-in-out infinite;
}

@keyframes mola-think-sway {
  0%, 100% { transform: rotate(-5deg) scale(1);    }
  50%      { transform: rotate( 5deg) scale(1.02); }
}
@keyframes mola-think-hand {
  /* Hand-l lifts toward the cheek and back. transform-origin is set
     inline at 60px 188px (the hand's anchor on the body). */
  0%, 100% { transform: translate(0, 0)       rotate(0deg);   }
  50%      { transform: translate(8px, -42px) rotate(-22deg); }
}
@keyframes mola-brow-think-l {
  0%, 100% { transform: translateY(-1px) rotate(-3deg); }
  50%      { transform: translateY(-3px) rotate( 1deg); }
}
@keyframes mola-brow-think-r {
  0%, 100% { transform: translateY(-1px) rotate( 3deg); }
  50%      { transform: translateY(-3px) rotate(-1deg); }
}

/* ── SPEAKING: closed mouth hidden, "O" mouth pulses ──────────────── */
.mola-rich[data-state="speaking"] .mola-mouth-closed { display: none; }
.mola-rich[data-state="speaking"] .mola-mouth-o {
  display: block;
  animation: mola-talk 320ms ease-in-out infinite;
}
.mola-rich[data-state="speaking"] .mola-body-group {
  animation: mola-breathe-rich 3s ease-in-out infinite;
}

@keyframes mola-talk {
  0%,100% { transform: scaleY(0.5);  }
  50%     { transform: scaleY(1.05); }
}

.mola-name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-secondary);
}

#hero h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -.02em;
  line-height: 1.12;
  color: var(--c-primary);
  margin-bottom: 14px;
}

#hero p {
  font-size: 15.5px;
  color: var(--c-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Composer (in-flow, sticky-top once scrolled) ─────────────────── */
/* The composer pins to the top once scrolled. Content scrolling underneath
   it is masked by two fade layers (::before above, ::after below) so the
   bar always sits in a clean band of surface color — answers visually
   disappear ~20px below the bar instead of bleeding behind it. */
.composer {
  position: sticky;
  top: calc(var(--header-h) + 8px);   /* 8px breathing room below sticky header */
  z-index: 10;
  margin: 28px 0 24px;
  background: var(--c-surface);       /* fills the rounded-corner negative space behind composer-inner */
  border-radius: var(--radius-lg);
}

/* Inline "explore the rest of {Category}" link appended at the end of
   discuss (dig-deeper) bubbles. Lives inside the bubble, so it scrolls
   with the conversation instead of sticking to the viewport. */
.bubble-category-link {
  margin-top: 14px;
  padding-top: 12px;
  border-top: .5px dashed var(--c-divider);
  font-size: 13px;
  color: var(--c-secondary);
}
.bubble-category-link a {
  color: var(--c-accent-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.bubble-category-link a:hover {
  color: var(--c-primary);
  border-bottom-color: var(--c-accent);
}
.bubble-category-link a::after {
  content: " \2197";              /* northeast arrow */
  font-size: 11px;
  opacity: .7;
}

/* Inline vendor mention in prose (discuss bubbles): a profile link plus a
   compact Book Demo button. Only appears in card-free prose — card bubbles
   carry their own CTAs. Kept on one line so the name + button never split. */
.vendor-mention { white-space: nowrap; }
.vendor-mention-link {
  color: var(--c-accent-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.vendor-mention-link:hover {
  color: var(--c-primary);
  border-bottom-color: var(--c-accent);
}
.vendor-mention-link::after {
  content: " \2197";              /* northeast arrow — matches category links */
  font-size: 11px;
  opacity: .7;
}
.vendor-mention-demo {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 1px 9px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--c-accent-ink);
  background: rgba(62, 111, 158, .08);
  border: 1px solid rgba(62, 111, 158, .30);
  border-radius: 999px;
  cursor: pointer;
  vertical-align: baseline;
  transition: background 150ms ease, border-color 150ms ease;
}
.vendor-mention-demo:hover {
  background: rgba(62, 111, 158, .16);
  border-color: var(--c-accent);
}

/* Alternatives-to-X framing pill — surfaced at the top of every
   similar_vendors bubble so the buyer can see what the shortlist is
   an alternative to. Visually distinct from the shortlist surface
   (accent-tinted pill, not a card) so it reads as framing context,
   not as a vendor row. */
.bubble-alternatives-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px 0;
  padding: 6px 12px;
  background: rgba(62, 111, 158, .10);
  border: 1px solid rgba(62, 111, 158, .22);
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--c-primary);
  width: fit-content;
}
.bubble-alternatives-tag strong { font-weight: 600; }
.bubble-alternatives-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(62, 111, 158, .18);
  color: var(--c-accent, #3e6f9e);
  font-size: 12px;
  font-weight: 600;
}

/* Per-bubble AI caveat — light-grey reminder at the bottom of every
   Mola response (shortlist + discuss + comparison). Soft enough not to
   clutter the read, present enough not to forget. */
.bubble-caveat {
  margin-top: 12px;
  padding-top: 10px;
  border-top: .5px dashed rgba(0,0,0,.06);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--c-muted);
  font-style: italic;
}
.composer::before,
.composer::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: -1;
}
.composer::before {
  /* Mask above the bar: hides anything peeking through the 8px gap between
     the sticky header bottom and the bar's top edge. */
  bottom: 100%;
  height: 12px;
  background: var(--c-surface);
}
.composer::after {
  /* Buffer zone below the bar: answers must be fully out of view before
     they reach the bar's bottom edge. Solid surface color for the first
     ~46px, then a soft fade across the remaining ~18px so the transition
     to visible content isn't a hard line. */
  top: 100%;
  height: 64px;
  background: linear-gradient(to bottom, var(--c-surface) 72%, rgba(242, 246, 250, 0));
}
.composer-inner {
  position: relative;        /* sit above the masks */
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;          /* solid — no more bleed-through */
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color 180ms ease, box-shadow 200ms ease;
}
.composer-inner:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 8px 24px -8px rgba(31,58,92,.18), 0 0 0 3px rgba(62,111,158,.10);
}

/* Pulse fired when a follow-up chip is clicked — draws the eye to the
   newly-populated composer, then settles into the focus-within state. */
.composer-inner.composer-pulse {
  animation: composer-pulse 950ms cubic-bezier(.2,.8,.2,1);
}
@keyframes composer-pulse {
  0%   { box-shadow: var(--shadow-md), 0 0 0  0 rgba(62,111,158,0);    border-color: var(--c-divider); }
  25%  { box-shadow: var(--shadow-md), 0 0 0  9px rgba(62,111,158,.22); border-color: var(--c-accent); }
  60%  { box-shadow: var(--shadow-md), 0 0 0  6px rgba(62,111,158,.10); border-color: var(--c-accent); }
  100% { box-shadow: var(--shadow-md), 0 0 0  3px rgba(62,111,158,.10); border-color: var(--c-accent); }
}

/* ── Empty-state chips (hidden once a question is asked) ─────────── */
#empty-state-chips {
  text-align: center;
  padding: 8px 16px 16px;
}
.examples-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 14px;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.example-chip {
  /* Reset native <button> defaults */
  font-family: inherit;
  line-height: 1.4;
  margin: 0;
  /* Chip styling */
  background: #fff;
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-secondary);
  text-align: left;        /* wrapped multi-line chips stay left-aligned */
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
  user-select: none;
}
.example-chip:hover {
  border-color: var(--c-accent);
  color: var(--c-primary);
  background: var(--c-subtle-2);
}
.example-chip:active { transform: scale(.985); }
.example-chip:focus { outline: none; }
.example-chip:focus-visible {
  outline: none;
  border-color: var(--c-accent);
  color: var(--c-primary);
  background: var(--c-subtle-2);
  box-shadow: 0 0 0 3px rgba(62,111,158,.18);
}

/* Click feedback — chip flashes once when tapped, even if release is off */
.example-chip.chip-tapped {
  animation: chip-tap 450ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
@keyframes chip-tap {
  0%   { transform: scale(1);   background: #fff;            border-color: var(--c-divider); color: var(--c-secondary); }
  35%  { transform: scale(.94); background: var(--c-subtle); border-color: var(--c-accent);  color: var(--c-primary);   }
  100% { transform: scale(1);   background: #fff;            border-color: var(--c-divider); color: var(--c-secondary); }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSE BLOCK
   ══════════════════════════════════════════════════════════════════ */
/* Inset 16px each side so answer content sits ~32px narrower than the ask
   bar above. Cards then pass fully behind the bar when scrolling — no side
   edges poking out beside it. */
#response-area {
  display: none;
  padding: 0 16px;
}

.question-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}

.question-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -.01em;
  color: var(--c-primary);
  margin-bottom: 20px;
  line-height: 1.35;
}

.summary {
  background: #fff;
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--c-secondary);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}

/* ── Vendor cards (editorial layout) ──────────────────────────────── */
.vendor-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vendor-card {
  position: relative;
  background: #fff;
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-lg);
  padding: 18px 24px 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms ease;
}
/* accent left-bar slides in on hover */
.vendor-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c-accent);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.vendor-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.vendor-card:hover::before { transform: scaleY(1); }

/* Kicker row: rank on left, category chip on right */
.vendor-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.vendor-rank {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: .04em;
}
.vendor-rank:not(:only-child)::after {
  content: "";
  width: 18px;
  height: .5px;
  background: var(--c-divider);
}
.vendor-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.05px;
  background: var(--c-subtle);
  color: var(--c-accent-ink);
  border: .5px solid var(--c-divider);
  padding: 4px 11px 4px 9px;
  border-radius: var(--radius-full);
  text-transform: lowercase;
  flex-shrink: 0;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.vendor-category::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
}
.vendor-card:hover .vendor-category {
  background: #fff;
  border-color: var(--c-accent);
  color: var(--c-primary);
}

/* "Explore more in this category" card — last item in the vendor grid.
   Inherits .vendor-card structure but tinted so it reads as a different
   artifact (a link out, not a Mola pick). */
.category-link-card {
  background: var(--c-subtle-2);
  border-style: dashed;
  border-color: var(--c-divider);
  text-decoration: none;
  color: inherit;
}
.category-link-card:hover {
  background: #fff;
}
.category-link-card .vendor-name {
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  margin-top: 4px;
}
.category-link-card .why-fit {
  text-align: center;
}
.category-link-card .card-footer {
  justify-content: center;
}
.category-link-card .cta-link {
  width: 100%;
  justify-content: center;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 13px;
}
.category-link-tag {
  text-transform: none;
  letter-spacing: 0;
}

/* Cap-th-turn callout — last allowed follow-up. Warm amber tint
   (softer than red) with a left accent bar + alert icon. Gentle
   pulse fades in to draw the eye without screaming. */
.last-turn-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #FFF6E6;
  border: .5px solid #E8B453;
  border-left: 3px solid #C97A20;
  border-radius: var(--radius-md);
  color: #8A4A0A;
  font-size: 13.5px;
  line-height: 1.45;
  animation: last-turn-fade-in 480ms cubic-bezier(.2,.8,.2,1);
}
.last-turn-callout strong {
  color: #6B3608;
  font-weight: 600;
}
.last-turn-callout-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #C97A20;
  margin-top: 1px;
}
@keyframes last-turn-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Inline New-Conversation CTA next to a closing message (last-turn callout
   + depth-cap bubble). The callout is a flex row, so force the button onto
   its own line beneath the message. */
.inline-new-convo { margin-top: 10px; }
.last-turn-callout { flex-wrap: wrap; }
.last-turn-callout .inline-new-convo { flex-basis: 100%; margin-top: 8px; }

.vendor-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-primary);
  letter-spacing: -.15px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.why-fit {
  font-size: 14.5px;
  color: var(--c-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

/* Per-vendor card body: three concise axis bullets (strength / watch-out /
   best fit) from the blurb pass. Replaces the old single run-on why-fit
   line on live cards. */
.vendor-axes {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vendor-axes li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--c-primary);
}
.vendor-axes .axis-tag {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-accent-ink);
  margin-right: 6px;
}
/* Streaming skeleton bars while the per-vendor blurb is in flight. */
.vendor-axes.is-loading .best-fit-skeleton {
  display: inline-block;
  height: 10px;
  width: 70%;
  border-radius: 4px;
  vertical-align: middle;
  background: linear-gradient(
    90deg,
    rgba(31, 58, 92, 0.08) 0%,
    rgba(31, 58, 92, 0.18) 50%,
    rgba(31, 58, 92, 0.08) 100%
  );
  background-size: 200% 100%;
  animation: best-fit-shimmer 1.2s ease-in-out infinite;
}
.vendor-axes:not(.is-loading) .best-fit-skeleton {
  display: none;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: .5px solid var(--c-divider);
}

.pricing-note {
  font-size: 11.5px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color: var(--c-muted);
  letter-spacing: .02em;
}
.pricing-note:empty::before { content: ""; }

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.05px;
  color: var(--c-primary);
  text-decoration: none;
  padding: 8px 14px;
  background: var(--c-subtle-2);
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-md);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 120ms ease;
  flex-shrink: 0;
}
.cta-link:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.cta-link:active { transform: scale(.985); }
.cta-link svg {
  width: 12px; height: 12px;
  transition: transform 180ms ease;
}
.cta-link:hover svg { transform: translateX(2px); }

/* Split footer: Book Demo (primary) on the left, View profile
   (secondary) on the right. Forced side-by-side at every width —
   each CTA takes 50% of the row and shrinks its padding rather than
   wrapping to a second line. */
.card-footer-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-wrap: nowrap;
}
.card-footer-split .cta-link {
  justify-content: center;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}
.cta-link.cta-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.cta-link.cta-primary:hover {
  background: var(--c-primary-hover);
  border-color: var(--c-primary-hover);
}
.cta-link.cta-secondary {
  /* inherits the base .cta-link subtle look */
}

.caveats {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--c-muted);
  font-style: italic;
  line-height: 1.55;
}

/* ── Suggested follow-up questions (Mola) ─────────────────────────── */
.suggested-questions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: .5px solid var(--c-divider);
}
.suggested-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--c-secondary);
  margin-bottom: 14px;
  letter-spacing: -.05px;
}
.suggested-label .mola-icon-xs { margin-bottom: 1px; }

.suggested-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggested-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
}
.sugg-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: .3;
  animation: sugg-pulse 1.3s ease-in-out infinite;
}
.sugg-dot:nth-child(2) { animation-delay: .18s; }
.sugg-dot:nth-child(3) { animation-delay: .36s; }
@keyframes sugg-pulse {
  0%, 100% { opacity: .25; transform: scale(.85); }
  50%      { opacity: 1;   transform: scale(1);   }
}

/* ── Error / Mola message block (DS info-callout pattern) ─────────── */
.error-block {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--c-subtle-2);
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.error-block .mola-icon-sm {
  margin-top: 2px;
}
.error-block-body {
  flex: 1;
  font-size: 14px;
  color: var(--c-secondary);
  line-height: 1.6;
}
.error-block-body strong {
  display: block;
  color: var(--c-primary);
  font-weight: 600;
  margin-bottom: 2px;
}
.error-block.is-hard {
  background: var(--c-danger-bg);
  border-color: #F5B5B5;
}
.error-block.is-hard .error-block-body { color: var(--c-danger); }
.error-block.is-hard .error-block-body strong { color: var(--c-danger); }
.error-block.is-hard .mola-icon-sm { color: var(--c-danger); }

/* ══════════════════════════════════════════════════════════════════
   SKELETON LOADER
   ══════════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--c-subtle) 25%, var(--c-subtle-2) 50%, var(--c-subtle) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-summary {
  height: 92px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.skeleton-card {
  height: 108px;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════════
   COMPOSER FIELDS — DS form-input + btn-primary
   ══════════════════════════════════════════════════════════════════ */
#question-input {
  flex: 1;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--c-primary);
  background: transparent;
  resize: none;
  /* min-height matches the ask button (48px) so single-line placeholder
     never clips against the textarea's content box, and both controls
     align cleanly via the composer's `align-items: center`. */
  min-height: 48px;
  max-height: 160px;
  line-height: 1.4;
  outline: none;
  box-sizing: border-box;
}
#question-input::placeholder { color: var(--c-muted); }

#ask-btn {
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 22px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -.05px;
  cursor: pointer;
  height: 48px;
  display: flex; align-items: center; gap: 8px;
  transition: background 150ms ease, transform 120ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}
#ask-btn:hover:not(:disabled) { background: var(--c-primary-hover); }
#ask-btn:active:not(:disabled) { transform: scale(.985); }
#ask-btn:disabled { background: var(--c-muted); cursor: not-allowed; }
#ask-btn .btn-label-thinking {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════
   DEBUG PANEL
   ══════════════════════════════════════════════════════════════════ */
.debug-panel {
  margin-top: 16px;
  border: .5px dashed var(--c-divider);
  border-radius: var(--radius-md);
  font-size: 12px;
  background: var(--c-subtle-2);
}
.debug-panel summary {
  padding: 8px 14px;
  cursor: pointer;
  color: var(--c-secondary);
  font-weight: 600;
  user-select: none;
}
.debug-body {
  padding: 12px 14px;
  border-top: .5px dashed var(--c-divider);
  color: var(--c-secondary);
  line-height: 1.7;
}
.debug-body pre {
  margin-top: 8px;
  background: #fff;
  border: .5px solid var(--c-divider);
  border-radius: var(--radius-sm);
  padding: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════
   MOTION — DS fade-in stagger (80ms increments)
   ══════════════════════════════════════════════════════════════════ */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-1 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1)  80ms both; }
.fade-in-2 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 160ms both; }
.fade-in-3 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 240ms both; }
.fade-in-4 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 320ms both; }
.fade-in-5 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 400ms both; }
.fade-in-6 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 480ms both; }
.fade-in-7 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 560ms both; }
.fade-in-8 { animation: fade-in 600ms cubic-bezier(.2,.8,.2,1) 640ms both; }

/* Spinner used in Ask button while loading */
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════
   M9 — Multi-turn conversation
   ══════════════════════════════════════════════════════════════════ */

.conversation {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Top margin clears the composer's 64px ::after fade mask so the first
     turn isn't clipped when scrolled under the sticky composer. */
  margin: 72px 0 32px;
}

.turn {
  display: flex;
  gap: 12px;
  width: 100%;
}

.turn-user { justify-content: flex-end; }
.turn-mola {
  justify-content: flex-start;
  align-items: flex-start;
  /* Scroll-anchor target for scrollResponseIntoView (block:'start'). Must clear
     the full sticky stack or the answer's top hides behind the composer and the
     "scroll to the top of the answer" behavior looks broken. Measured: header
     bottom + composer = 187px viewport-absolute, plus the composer's 64px
     ::after buffer mask = 251px occluded. Verified via Playwright: margin 260
     → answer top at 254 (clears); 272 leaves ~15px breathing above the mask. */
  scroll-margin-top: 272px;
}

.mola-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 42px;
  margin-top: 2px;
  color: var(--c-primary);
}
.mola-avatar svg,
.mola-avatar img.mola-icon { width: 100%; height: 100%; display: block; }
img.mola-icon-xs { width: 28px; height: 34px; }

.bubble {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  padding: 12px 16px;
  border-radius: 14px;
  border: .5px solid var(--c-divider);
  background: #fff;
  max-width: 760px;
}

.bubble-user {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
  border-bottom-right-radius: 4px;
}

.bubble-mola {
  background: #fff;
  color: var(--c-primary);
  border-bottom-left-radius: 4px;
  flex: 1;
}

.bubble-error.is-hard {
  background: var(--c-danger-bg);
  border-color: var(--c-danger);
  color: var(--c-danger);
}

.bubble-body p { margin: 0 0 8px; }
.bubble-body p:last-child { margin-bottom: 0; }
.bubble-body .mola-h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin: 4px 0 10px;
  color: var(--c-primary);
}
.bubble-body .mola-list { margin: 0 0 6px; padding-left: 20px; }
.bubble-body .mola-list li { margin: 2px 0; }
.bubble-body strong { font-weight: 600; }
.bubble-body em { font-style: italic; font-family: var(--font-serif); }

.answer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.answer-chip {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: .5px solid var(--c-accent);
  background: var(--c-subtle-2);
  color: var(--c-accent-ink);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.answer-chip:hover {
  background: var(--c-subtle);
  border-color: var(--c-primary);
}
.answer-chip.chip-tapped {
  transform: scale(.97);
  background: var(--c-primary);
  color: #fff;
}

.answer-hint {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--c-secondary);
  font-family: var(--font-serif);
  font-style: italic;
}

/* Multi-select checkboxes */
.answer-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.answer-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: .5px solid var(--c-divider);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.answer-check:hover { border-color: var(--c-accent); background: var(--c-subtle-2); }
.answer-check input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--c-accent);
  flex: 0 0 16px;
  cursor: pointer;
}
.answer-check span { line-height: 1.4; color: var(--c-primary); }

.multi-continue {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 10px;
  border: .5px solid var(--c-primary);
  background: var(--c-primary);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.multi-continue:hover:not(:disabled) { background: var(--c-primary-hover); }
.multi-continue:disabled { opacity: .4; cursor: not-allowed; }

/* Once a question has been answered, fade its chips/inputs so the user
   knows that turn is closed. Locked controls are also disabled via JS. */
.turn-question.is-answered .answer-chip,
.turn-question.is-answered .answer-check,
.turn-question.is-answered .multi-continue,
.turn-question.is-answered .inline-answer {
  opacity: .45;
  pointer-events: none;
}
.turn-question.is-answered .answer-chip { cursor: default; }

/* Stale chips on earlier Mola bubbles (after a new turn fires) — read
   as inactive so the buyer can't backtrack mid-conversation. */
.turn-mola.is-stale .answer-chip,
.turn-mola.is-stale .example-chip {
  opacity: .42;
  cursor: not-allowed;
  pointer-events: none;
}
.turn-mola.is-stale .answer-check { opacity: .42; pointer-events: none; }

.inline-answer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: .5px solid var(--c-divider);
}
/* Chip-less question (graceful free-text clarify) — drop the separator and
   the italic "or" framing; the input is the whole answer surface. */
.inline-answer.no-chips {
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
}
.inline-answer.no-chips .inline-answer-or {
  font-style: normal;
  font-family: var(--font-sans);
  color: var(--c-primary);
  font-size: 13px;
}
.inline-answer-or {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--c-secondary);
  margin-bottom: 8px;
}
.inline-answer-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;  /* keep Send pinned to the bottom as textarea grows */
}
.inline-answer-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: 10px;
  border: .5px solid var(--c-divider);
  background: #fff;
  color: var(--c-primary);
  outline: none;
  resize: none;            /* user lets autosize handle it */
  overflow-y: auto;
  min-height: 38px;
  max-height: 160px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.inline-answer-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 2px rgba(62, 111, 158, .15);
}
.inline-answer-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 38px;            /* match textarea min-height */
  border-radius: 10px;
  border: .5px solid var(--c-primary);
  background: var(--c-primary);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.inline-answer-send:hover { background: var(--c-primary-hover); }
.inline-answer-input:disabled,
.inline-answer-send:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* M11.5d — inline follow-up input attached to the latest response bubble
   when the buyer is in post-refresh follow-up-only mode. Visually echoes
   the inline-answer block on question bubbles. */
.inline-followup-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: .5px dashed var(--c-divider);
}
.inline-followup-label {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-accent-ink);
  margin-bottom: 8px;
}

.follow-up {
  margin-top: 14px;
  padding-top: 12px;
  border-top: .5px solid var(--c-divider);
}
.follow-up-prompt {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--c-accent-ink);
}

.thinking-text {
  display: inline-flex;
  align-items: baseline;
  padding: 4px 2px;
  color: var(--c-muted);
  font-style: italic;
}
.thinking-msg {
  transition: opacity .2s ease;
}
.thinking-text.is-swapping .thinking-msg {
  opacity: .15;
}
/* Typing-style animated ellipsis after the rotating status line. */
.thinking-ellipsis {
  display: inline-block;
  width: 1.2em;
  text-align: left;
}
.thinking-ellipsis::after {
  content: '';
  animation: thinking-ellipsis 1.4s steps(1, end) infinite;
}
@keyframes thinking-ellipsis {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%, 100% { content: '...'; }
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 0;
  min-height: 24px;
}
.composer-hint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--c-secondary);
}
.new-convo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(62, 111, 158, .22);
  background: rgba(62, 111, 158, .08);
  color: var(--c-accent-ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.new-convo-btn .new-convo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #fff;
  flex-shrink: 0;
}
.new-convo-btn .new-convo-icon svg {
  width: 12px;
  height: 12px;
}
.new-convo-btn:hover {
  border-color: var(--c-accent);
  background: rgba(62, 111, 158, .16);
  color: var(--c-primary);
  box-shadow: 0 1px 3px rgba(31, 58, 92, .08);
}
.new-convo-btn[hidden] { display: none; }

/* Quiet, low-salience New-Conversation control. Used for the demoted
   composer-toolbar link AND the per-answer CTA appended below answer
   bubbles. Reads as a subtle text link, not a button, so it stays out of
   the way until the buyer is looking for it. */
.new-convo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color .15s ease;
}
.new-convo-link svg { width: 13px; height: 13px; flex-shrink: 0; }
.new-convo-link:hover { color: var(--c-accent); text-decoration: underline; }
.new-convo-link[hidden] { display: none; }

/* Wrapper for the per-answer New-Conversation CTA — sits directly below the
   inline follow-up bar as the secondary "or start over" action. */
.turn-new-convo {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* M11.5d — emphasized state, used when the conversation has hit the
   follow-up depth cap. Pulses to draw the buyer's eye to the only
   forward action they have left. */
.new-convo-btn.is-emphasized {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 0 rgba(62, 111, 158, .50);
  animation: new-convo-pulse 2.4s ease-in-out infinite;
}
.new-convo-btn.is-emphasized .new-convo-icon {
  background: #fff;
  color: var(--c-accent);
}
@keyframes new-convo-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(62, 111, 158, .45); }
  60%  { box-shadow: 0 0 0 10px rgba(62, 111, 158, 0);  }
  100% { box-shadow: 0 0 0 0   rgba(62, 111, 158, 0);   }
}

/* ── Themed confirm modal (replaces window.confirm) ─────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 58, 92, .42);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity .14s ease-out;
}
.modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 22px 18px;
  width: min(420px, calc(100vw - 32px));
  border: .5px solid var(--c-divider);
  transform: translateY(6px);
  transition: transform .18s ease-out;
}
.modal-backdrop.is-open .modal-card {
  transform: translateY(0);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-primary);
  line-height: 1.25;
  margin-bottom: 8px;
}
.modal-message {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-secondary);
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-actions button {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .12s ease-out, color .12s ease-out, border-color .12s ease-out;
}
.modal-cancel {
  background: #fff;
  border: 1px solid var(--c-divider);
  color: var(--c-secondary);
}
.modal-cancel:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.modal-confirm {
  background: var(--c-primary);
  border: 1px solid var(--c-primary);
  color: #fff;
}
.modal-confirm:hover {
  background: var(--c-primary-hover);
  border-color: var(--c-primary-hover);
}
.modal-confirm:disabled {
  opacity: .6;
  cursor: progress;
}

/* Book Demo modal — wider card + form layout */
.modal-backdrop.demo-modal .demo-modal-card {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* ── Compare: select up to 2 + structured comparison table ──────────────── */
.compare-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;          /* push to the right of the kicker row */
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  user-select: none;
}
.compare-select input { cursor: pointer; }
.compare-checkbox:disabled + span { opacity: .4; }
.compare-select:has(.compare-checkbox:disabled) { cursor: default; }

.compare-bar {
  position: fixed;
  left: 50%;
  /* Clear the fixed "Mola is AI" footer strip (bottom:0, ~34px tall). */
  bottom: 52px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 24px);
}
.compare-bar-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}
.compare-go {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
}
.compare-go:disabled { opacity: .5; cursor: default; }
.compare-clear {
  font-size: 18px;
  line-height: 1;
  color: rgba(255, 255, 255, .85);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}

.modal-backdrop.compare-modal .compare-modal-card {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.compare-table-wrap { overflow-x: auto; margin: 8px 0 4px; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 13px;
}
.compare-table th,
.compare-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: .5px solid var(--c-divider);
}
.compare-table thead th {
  font-weight: 600;
  color: var(--c-primary);
  border-bottom: 1px solid var(--c-divider);
}
.compare-table tbody th {
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
  width: 1%;
}
.compare-table td { color: var(--c-primary); }
.compare-row-differ td,
.compare-row-differ th { background: #FFF6E6; }
.compare-bottom {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-secondary);
}
.compare-bottom p { margin: 4px 0; }
.compare-modal-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--c-muted);
  line-height: 1.4;
}
.demo-modal-sub {
  margin-bottom: 16px;
}
/* Highlight the "30-min" commitment so it's not missed in the sub-header. */
.demo-duration {
  font-weight: 700;
  color: var(--c-accent-ink);
  background: rgba(62, 111, 158, .16);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
/* Title row: let the vendor name + View-profile link wrap gracefully. */
.demo-modal-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
/* Make the vendor name stand out in the title. */
.demo-vendor-name {
  font-weight: 700;
  color: var(--c-primary);
  border-bottom: 2px solid var(--c-accent);
  padding-bottom: 1px;
}
/* Inline "View profile" link beside the vendor name (opens DTH in a new tab). */
.demo-view-profile {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent-ink);
  text-decoration: none;
  white-space: nowrap;
}
.demo-view-profile svg { width: 13px; height: 13px; }
.demo-view-profile:hover { color: var(--c-accent); text-decoration: underline; }
.demo-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.demo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--c-secondary);
}
.demo-field > span {
  font-weight: 600;
  color: var(--c-primary);
}
.demo-optional {
  font-weight: 400;
  color: var(--c-secondary);
}
.demo-field input,
.demo-field textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 9px 11px;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--c-primary);
  transition: border-color .12s ease-out, box-shadow .12s ease-out;
}
.demo-field textarea {
  resize: vertical;
}
.demo-field input:focus,
.demo-field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20, 35, 70, .08);
}
.demo-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-md);
  background: #fafbfc;
}
.demo-slots-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 2px;
}
.demo-slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-slot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.demo-slot-date,
.demo-slot-time {
  flex: 1;
  min-width: 110px;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--c-primary);
  appearance: auto;
  transition: border-color .12s ease-out, box-shadow .12s ease-out;
}
.demo-slot-date:focus,
.demo-slot-time:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20, 35, 70, .08);
}
.demo-remove-slot {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: var(--c-muted);
  background: transparent;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.demo-remove-slot:hover {
  color: #c0392b;
  border-color: #c0392b;
}
.demo-add-slot {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  background: transparent;
  border: 1px dashed var(--c-divider);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  cursor: pointer;
}
.demo-add-slot:hover:not(:disabled) {
  border-color: var(--c-primary);
}
.demo-add-slot:disabled {
  opacity: .45;
  cursor: default;
}
/* datetime-local rules replaced by .demo-slot-date / .demo-slot-time above */
.demo-flexible {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--c-primary);
  cursor: pointer;
}
.demo-flexible input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.demo-error {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #c0392b;
  padding: 8px 10px;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: var(--radius-md);
}

.error-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  border: .5px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.retry-btn:hover:not(:disabled) { background: rgba(0, 0, 0, .05); }
.retry-btn:disabled { opacity: .5; cursor: not-allowed; }

.bubble-mola .vendor-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

/* M9 — structured per-axis blurb blocks inside vendor cards */
.vendor-axis {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: .5px dashed var(--c-divider);
}
.vendor-axis:first-of-type {
  margin-top: 12px;
  padding-top: 10px;
  border-top: .5px solid var(--c-divider);
}
.vendor-axis .axis-label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-secondary);
}
.vendor-axis .axis-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--c-primary);
}
.vendor-axis-strength .axis-label { color: var(--c-success); }
.vendor-axis-weakness .axis-label { color: var(--c-warning); }
.vendor-axis-fit      .axis-label { color: var(--c-accent-ink); }

/* Best-fit row on vendor cards (rendered all-or-nothing across the grid). */
.vendor-best-fit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: .5px dashed var(--c-divider);
}
.vendor-best-fit .axis-label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-accent-ink);
}
.vendor-best-fit .axis-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--c-primary);
}

/* M11.5c — streaming skeleton: pulsing bar shown in the Best-fit row
   while the per-vendor blurb LLM call is in flight. Replaced with the
   real text the moment the vendor_card SSE event arrives. */
.vendor-best-fit.is-loading .best-fit-skeleton {
  display: block;
  height: 10px;
  width: 78%;
  margin-top: 6px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(31, 58, 92, 0.08) 0%,
    rgba(31, 58, 92, 0.18) 50%,
    rgba(31, 58, 92, 0.08) 100%
  );
  background-size: 200% 100%;
  animation: best-fit-shimmer 1.2s ease-in-out infinite;
}
.vendor-best-fit:not(.is-loading) .best-fit-skeleton {
  display: none;
}
@keyframes best-fit-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════════════
   REDUCED MOTION — disable non-essential motion
   ══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  :root { --header-h: 69px; }
  main { padding: 28px 18px 140px; }
  #hero { padding: 16px 12px 20px; }
  #hero h2 { font-size: 26px; }
  .mola-rich-hero { width: 140px; height: 163px; }
  .question-text { font-size: 19px; }
  .vendor-card { padding: 16px 18px; }
  .vendor-kicker { flex-wrap: wrap; }
  .card-footer { flex-direction: column; align-items: flex-start; }
  /* Two-CTA footer stays as a side-by-side grid on mobile too. */
  .card-footer-split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .card-footer-split .cta-link { font-size: 11.5px; padding: 8px 8px; }
}

/* ── FU-P3-056 — per-turn feedback widget ────────────────────────────────── */
.bubble-feedback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(62,111,158,.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble-feedback.is-emphasized {
  border-top: 1px solid rgba(62,111,158,.4);
  background: rgba(62,111,158,.06);
  margin-left: -14px;
  margin-right: -14px;
  padding: 14px;
  border-radius: 10px;
}
.feedback-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feedback-prompt {
  font-size: 13px;
  color: var(--c-secondary);
  margin-right: auto;
}
.bubble-feedback.is-emphasized .feedback-prompt {
  font-weight: 600;
  color: var(--c-primary);
  font-size: 14px;
}
.feedback-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(62,111,158,.25);
  background: var(--c-surface);
  color: var(--c-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .08s ease;
}
.feedback-thumb svg { width: 16px; height: 16px; }
.feedback-thumb:hover:not(:disabled) { border-color: var(--c-accent); color: var(--c-accent); }
.feedback-thumb:active:not(:disabled) { transform: scale(.92); }
.feedback-thumb.is-selected {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}
.feedback-thumb.feedback-down.is-selected {
  background: #b65f5f;
  border-color: #b65f5f;
}
.feedback-thumb:disabled {
  cursor: default;
  opacity: .8;
}
.feedback-text-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* HTML `hidden` attribute would normally set display:none via UA stylesheet,
   but the class selector above wins on specificity. Restore the intended
   reveal-on-thumb-click behavior. Same for the confirmation strip. */
.feedback-text-row[hidden],
.feedback-confirm[hidden] {
  display: none;
}
.feedback-text {
  width: 100%;
  min-height: 64px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  border: 1px solid rgba(62,111,158,.25);
  border-radius: 8px;
  background: var(--c-surface);
  color: var(--c-primary);
  resize: vertical;
  box-sizing: border-box;
}
.feedback-text:disabled { background: rgba(62,111,158,.04); opacity: .85; }
.feedback-text-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.feedback-counter {
  font-size: 11.5px;
  color: var(--c-muted);
}
.feedback-submit {
  font: inherit;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: var(--c-accent);
  color: #fff;
  cursor: pointer;
  transition: background .12s ease, opacity .12s ease;
}
.feedback-submit:hover:not(:disabled) { background: var(--c-accent-ink); }
.feedback-submit:disabled { opacity: .55; cursor: default; }
.feedback-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.feedback-cancel {
  font: inherit;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--c-secondary);
  border: 1px solid rgba(62,111,158,.25);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.feedback-cancel:hover:not(:disabled) {
  background: rgba(62,111,158,.06);
  color: var(--c-primary);
  border-color: rgba(62,111,158,.4);
}
.feedback-cancel:disabled { opacity: .55; cursor: default; }
.feedback-confirm {
  font-size: 12.5px;
  color: var(--c-accent);
  font-style: italic;
}
