/* Ally: transparent band below hero video, then its own section (LTM flow) */

.sxs-ally-section {
  --sxs-ally-gutter: 80px;
  --sxs-ally-bar-max: 680px;
  --sxs-ally-radius: 1px;
  --sxs-ally-pill: 999px;
  --sxs-ally-ltm-ring: rgba(255, 95, 80, 0.9);
  --sxs-ally-3d:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 -1px 0 rgba(0, 0, 0, 0.05) inset,
    0 10px 28px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.06);
  --sxs-ally-3d-hover:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 14px 36px rgba(0, 0, 0, 0.14),
    0 4px 10px rgba(0, 0, 0, 0.08);
}

html:has(#sxs-ally-section),
body.sxs-search-open,
body.sxs-search-open.sxs-search-active,
.sxs-ally-section,
.sxs-ally-section *,
.sxs-ally-section__clipper {
  overflow-anchor: none;
}

body.sxs-search-open .hero,
body.sxs-search-open.sxs-search-active .hero {
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  transition: none !important;
}

.sxs-ally-bridge {
  display: none;
}

/* Sit on the hero video — 30px of video below the bar, no extra band until click */
body:has(#sxs-ally-section):not(.sxs-search-open) .hero {
  padding-bottom: 30px;
}

.sxs-ally-section {
  position: relative;
  z-index: 6;
  box-sizing: border-box;
  margin: -102px 0 0;
  padding: 0 0 30px;
  height: 102px;
  background: transparent;
  scroll-margin: 0;
  overflow: visible;
  overflow-anchor: none;
  transition: background 0.4s ease, height 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section {
  height: auto;
  padding: 0 0 32px;
  background: #0a0a0a;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section {
  height: auto;
  padding: 0 0 48px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(227, 0, 29, 0.09) 0%, transparent 55%),
    #0a0a0a;
}

.sxs-ally-section .container-xl {
  position: relative;
}

.sxs-ally-section__clipper,
.sxs-ally-section .sxs-hero-clipper {
  position: relative;
  width: 100%;
  max-width: var(--sxs-ally-bar-max);
  margin-left: auto;
  margin-right: auto;
  height: 72px;
  max-height: none;
  overflow: hidden;
  transform: none;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform-origin: top center;
  overflow-anchor: none;
  transition: height 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-clipper,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed {
  height: 300px;
  max-height: none;
  overflow: hidden;
}

/* Neutralize legacy sparx-search.css hero/fixed clipper rules on Ally */
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-clipper,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-clipper.sxs-chips-revealed {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: var(--sxs-ally-bar-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-hero-clipper {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  transition: none !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-clipper.sxs-chips-revealed .sxs-hero-chip,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-clipper.sxs-chips-revealed .sxs-hero-chip:nth-child(n) {
  opacity: 1 !important;
  transition-delay: 0s !important;
}

body:not(.sxs-search-open) .sxs-ally-section__clipper {
  height: 72px;
  overflow: hidden;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section__clipper {
  max-height: none;
  overflow: visible;
}

.sxs-ally-section .sxs-overlay-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  position: relative;
  background: transparent;
  border-radius: 0;
  transition:
    background 0.45s ease,
    border-radius 0.45s ease,
    box-shadow 0.45s ease;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section {
  height: auto;
  padding: 0 0 32px;
  background: #0a0a0a;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .container-xl {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.sxs-search-open .sxs-ally-section .sxs-overlay-main {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-overlay-main {
  max-width: var(--sxs-ally-bar-max) !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-overlay-main {
  border-radius: var(--sxs-ally-radius);
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-overlay-main {
  isolation: isolate;
  overflow: visible;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-overlay-main::before {
  display: none;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-hero-bar-shell,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-hero-chips {
  position: relative;
  z-index: 1;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .container-xl {
  max-width: 1512px;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section__clipper {
  max-width: none;
  width: 100%;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-overlay-main {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: linear-gradient(168deg, #ffffff 0%, #fafafb 55%, #f4f4f6 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--sxs-ally-radius);
  box-shadow:
    var(--sxs-ally-3d),
    0 32px 80px rgba(0, 0, 0, 0.35);
  animation: none;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-overlay-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e3001d 0%, #e3001d 72px, rgba(227, 0, 29, 0.15) 72px, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.sxs-ally-section #sparx-ai-search,
.sxs-ally-section .sxs-root {
  width: 100%;
  font-family: inherit;
  opacity: 1;
}

.sxs-ally-section .sxs-bar-wrap {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.sxs-ally-section .sxs-hero-bar-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

.sxs-ally-section .sxs-hero-chips {
  display: block;
  max-height: none;
  opacity: 1;
  overflow: visible;
  margin: 0;
  padding: 18px 0 12px;
  pointer-events: none;
  transform: none;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chips,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-hero-chips {
  max-height: none;
  opacity: 1;
  pointer-events: auto;
  margin-top: 0;
  padding: 18px 0 12px;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-conversation,
body:not(.sxs-search-open) .sxs-ally-section .sxs-transcript,
body:not(.sxs-search-open) .sxs-ally-section .sxs-followups,
body:not(.sxs-search-open) .sxs-ally-section .sxs-suggestions,
body:not(.sxs-search-open) .sxs-ally-section .sxs-drawer-close {
  display: none !important;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-hero {
  gap: 0 !important;
  padding: 0 !important;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-dock {
  position: static;
  margin: 0;
  padding: 0;
  background: none;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar {
  height: 56px;
  gap: 14px;
  padding: 0 12px 0 4px;
  overflow: visible;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--sxs-ally-pill);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar:hover {
  border-color: #fff;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar__avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  flex: 0 0 48px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 2px solid #e3001d !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  overflow: hidden;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent !important;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar__input {
  font-size: 18px;
  color: transparent !important;
  caret-color: transparent;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar__input::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-bar__input:not(:placeholder-shown) {
  color: #fff;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-icon-btn {
  color: rgba(255, 255, 255, 0.85);
}

.sxs-ally-section .sxs-typeahead,
.sxs-ally-section .sxs-typeahead.sxs-typeahead--up {
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  z-index: 80;
  background: #fff;
  border: 1px solid #e4e4e8;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.sxs-ally-section .sxs-typeahead__item {
  color: #111;
}

.sxs-ally-section .sxs-typeahead__item:hover,
.sxs-ally-section .sxs-typeahead__item.is-active {
  background: #f5f5f7;
}

/* Typeahead dropdown — don’t clip inside clipper / dock */
.sxs-ally-section__clipper:has(.sxs-typeahead__item),
.sxs-ally-section__clipper:has(.sxs-typeahead li) {
  overflow: visible !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper:has(.sxs-typeahead__item),
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper:has(.sxs-typeahead li) {
  max-height: min(560px, 90vh) !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-hero-bar-shell,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-dock,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar-wrap,
body.sxs-search-open.sxs-search-active .sxs-ally-section #sparx-ai-search,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-bar-shell,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar-wrap,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section #sparx-ai-search,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-root {
  overflow: visible !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar {
  overflow: visible !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-dock {
  overflow: visible !important;
  padding-bottom: 48px !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section {
  overflow: visible;
  z-index: 6;
}

/* Close only on results panel — not on chips stage (LTM) */
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-drawer-close {
  display: none !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-drawer-close {
  display: grid !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-conversation,
body.sxs-search-open.sxs-search-active .sxs-ally-section #sparx-ai-search,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root {
  overflow: visible;
  max-height: none;
  height: auto;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-hero-bar-shell {
  overflow: visible;
}

/* drawer close — VIP block when active */

@media (max-width: 767px) {
  .sxs-ally-section {
    margin-top: -102px;
    padding: 0 0 30px;
    height: 102px;
  }

  body.sxs-search-open .sxs-ally-section {
    height: auto;
    padding: 0 0 20px;
  }

  body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section {
    background: #0a0a0a;
  }

  .sxs-ally-section__clipper {
    max-width: calc(100% - 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sxs-ally-section__clipper,
  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-overlay-main {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Live: neutralize legacy hero clipper rules from sparx-search.css ── */
body.sxs-search-open .hero,
body.sxs-search-open.sxs-search-active .hero {
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
}

body.sxs-search-open.sxs-search-active .hero {
  min-height: auto !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-overlay-main {
  justify-content: flex-start !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section #sparx-ai-search,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root--active {
  flex: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-conversation {
  flex: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}

/* transcript + dock sizing handled in VIP block below */

/* Ask Ally label sits ON TOP of the widget bar by default; hidden after click */
.sxs-ally-section .sxs-hero-bar-shell > #sparx-ai-search {
  position: relative;
  z-index: 1;
}

.sxs-ally-section .sxs-hero-ask-facade {
  position: absolute;
  left: 66px;
  top: 0;
  height: 56px;
  transform: none;
  z-index: 30;
  margin: 0;
  pointer-events: none;
  display: none;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.sxs-ally-section .sxs-hero-ask-facade__ask {
  color: #fff;
  letter-spacing: 0.01em;
}

.sxs-ally-section .sxs-hero-ask-facade__ally {
  color: #e3001d;
  letter-spacing: 0.01em;
}

body:not(.sxs-search-open) .sxs-ally-section .sxs-hero-ask-facade,
body:not(.sxs-search-open) .sxs-ally-section .sxs-hero-ask-facade.is-on,
body:not(.sxs-search-open) .sxs-ally-section .sxs-hero-ask-facade[hidden] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.sxs-search-open .sxs-ally-section .sxs-hero-ask-facade {
  display: none !important;
}

@media (max-width: 767px) {
  .sxs-ally-section .sxs-hero-ask-facade {
    left: 66px;
    font-size: 16px;
    letter-spacing: 0.01em;
    gap: 5px;
  }
}

/* Chips + bar — LTM.com style (centered fixed width, smooth expand down) */
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper {
  max-width: var(--sxs-ally-bar-max);
  width: 100%;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-overlay-main {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  align-items: stretch;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-hero-bar-shell,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed #sparx-ai-search,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-root,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed .sxs-bar-wrap {
  width: 100%;
  max-width: var(--sxs-ally-bar-max);
  margin-left: auto;
  margin-right: auto;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar {
  height: 56px;
  padding: 0 12px 0 4px;
  gap: 14px;
  overflow: visible;
  background: #3f4555;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--sxs-ally-pill) !important;
  box-shadow: none;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar:focus-within,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar--listening {
  border-color: #fff;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
  outline: none !important;
  outline-offset: 0 !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar__avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  flex: 0 0 48px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 2px solid #e3001d !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: hidden;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar__avatar img {
  background: transparent !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar__input {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-icon-btn {
  color: #fff;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chip {
  opacity: 1 !important;
  transform: none !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chips__inner {
  gap: 18px;
  align-items: stretch;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chips__label {
  margin: 0;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-transform: none;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chips__grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chip {
  min-height: 56px;
  padding: 16px 22px 16px 28px;
  color: #0b0b0b !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--sxs-ally-pill) !important;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
  transform: none;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chip svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #0b0b0b;
  opacity: 1;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chip:hover {
  background: #f4f4f4 !important;
  border: none !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

@media (max-width: 767px) {
  body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-chips__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════
   VIP active results — white editorial panel on dark band
   ══════════════════════════════════════════════════════════════ */

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root--active,
body.sxs-search-open.sxs-search-active .sxs-ally-section #sparx-ai-search {
  --sxs-bg: #ffffff;
  --sxs-surface: #ffffff;
  --sxs-surface-2: #f7f7f8;
  --sxs-text: #0b0b0b;
  --sxs-text-muted: #454545;
  --sxs-text-dim: #6e6e76;
  --sxs-border: rgba(0, 0, 0, 0.08);
  --sxs-accent: #e3001d;
  --sxs-accent-strong: #e3001d;
  --sxs-accent-soft: rgba(227, 0, 29, 0.12);
  --sxs-font: "DM Sans", sans-serif;
  font-family: "DM Sans", sans-serif;
  background: transparent;
  color: #0b0b0b !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-transcript {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 68px var(--sxs-ally-gutter) 36px !important;
  box-sizing: border-box;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-turn__query {
  justify-content: center;
  margin-bottom: 32px;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-chip-query {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(720px, 100%);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111;
  text-align: center;
  background: #fff;
  border: 1px solid #e6e6ea;
  border-radius: var(--sxs-ally-radius);
  box-shadow: var(--sxs-ally-3d);
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-chip-query::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #e3001d;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-turn__answer {
  max-width: none;
  width: 100%;
  margin: 0;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-answer-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 24px;
  color: #0b0b0b !important;
  font-family: "DM Sans", sans-serif;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-answer-title__dot {
  width: 10px;
  height: 10px;
  margin-top: 0.42em;
  border-radius: 2px;
  background: #e3001d;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-answer-heading {
  margin: 36px 0 16px;
  color: #111 !important;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-answer-text,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-p,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-list {
  color: #3d3d45 !important;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: -0.01em;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-p strong,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-answer-text strong {
  color: #0b0b0b !important;
  font-weight: 600;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-list li::marker {
  color: #e3001d;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-cite {
  display: inline-flex !important;
  position: static !important;
  float: none !important;
  vertical-align: 0.14em;
  min-width: 19px;
  height: 19px;
  margin: 0 2px 0 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e3001d !important;
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-widget {
  margin-top: 48px;
  padding-top: 8px;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-widget__title {
  position: relative;
  margin: 0 0 22px;
  padding-left: 22px;
  color: #0b0b0b !important;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-widget__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 10px;
  height: 10px;
  background: #e3001d;
  border-radius: 2px;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 960px) {
  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-card {
  padding: 28px 30px;
  background: #3f4555;
  border: none;
  border-radius: var(--sxs-ally-radius);
  box-shadow: none;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-card:hover {
  transform: translateY(-2px);
  border: none;
  box-shadow: none;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-card__title {
  color: #ffffff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-card__body,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-card__outcome {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.6;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-card__outcome {
  border-top: none;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-readmore {
  font-weight: 600;
  color: #e3001d;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-followups__title {
  color: #111 !important;
  font-size: 20px;
  font-weight: 600;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-chip--followup {
  padding: 18px 20px;
  color: #111;
  background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
  border: 1px solid #d8d8de;
  border-radius: var(--sxs-ally-radius);
  box-shadow: var(--sxs-ally-3d);
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-chip--followup:hover {
  border-color: rgba(227, 0, 29, 0.35);
  background: #fffafb;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-disclaimer,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-generating {
  color: #757580 !important;
  font-size: 16px;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-disclaimer a {
  color: #e3001d;
  font-weight: 600;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-turn + .sxs-turn {
  border-top-color: #ececee;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-dock {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px var(--sxs-ally-gutter) 32px !important;
  background: transparent !important;
  border-top: 1px solid #e8e8ec !important;
  box-sizing: border-box;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar {
  max-width: 100%;
  height: 56px;
  margin: 0 auto;
  padding: 0 12px 0 4px;
  gap: 14px;
  overflow: visible;
  background: #fff;
  border: 1px solid #d2d2d6;
  border-radius: var(--sxs-ally-pill) !important;
  box-shadow: none;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar:focus-within,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar--listening {
  border-color: #bdbdc4;
  box-shadow: none;
  outline: none !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar__input {
  color: #111;
  font-size: 18px;
  font-weight: 500;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar__input::placeholder {
  color: #9a9aa3;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-icon-btn {
  color: #111;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-drawer-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  transform: none !important;
  z-index: 5;
  width: 44px;
  height: 44px;
  font-size: 30px;
  font-weight: 300;
  color: #555 !important;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 50%;
  margin: 0 !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-drawer-close:hover {
  background: rgba(227, 0, 29, 0.08) !important;
  color: #e3001d !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-hero-bar-shell {
  overflow: visible !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-conversation::-webkit-scrollbar-thumb {
  background: #c8c8d0;
}

@media (max-width: 767px) {
  body.sxs-search-open.sxs-search-active .sxs-ally-section {
    padding: 28px 0 40px;
  }

  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-overlay-main {
    border-radius: var(--sxs-ally-radius);
  }

  .sxs-ally-section {
    --sxs-ally-gutter: 20px;
  }

  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-transcript {
    padding: 52px var(--sxs-ally-gutter) 24px !important;
  }

  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-dock {
    padding: 18px var(--sxs-ally-gutter) 22px !important;
  }

  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-answer-title {
    font-size: 26px;
  }

  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-drawer-close {
    top: 14px !important;
    right: 14px !important;
  }


  body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar {
    height: 56px;
  }
}

/* Same pill bar in idle, chips, and results */
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-bar,
body:not(.sxs-search-open) .sxs-ally-section .sxs-bar,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-bar {
  border-radius: var(--sxs-ally-pill) !important;
}

/* Full panel width — no inner 784px / 1120px cap from sparx-search.css */
body.sxs-search-open.sxs-search-active .sxs-ally-section #sparx-ai-search,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-root--active,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-conversation,
body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-transcript {
  max-width: none !important;
  width: 100% !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-dock {
  max-width: none !important;
}

/* Avatar — single LTM circle, snug to the left like the design */
.sxs-ally-section .sxs-bar {
  align-items: center;
}

.sxs-ally-section .sxs-bar__avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 48px !important;
  align-self: center !important;
  border: 2px solid #e3001d !important;
  border-right: 2px solid #e3001d !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.sxs-ally-section .sxs-bar__avatar::before,
.sxs-ally-section .sxs-bar__avatar::after {
  display: none !important;
  content: none !important;
}

.sxs-ally-section .sxs-bar__avatar img {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
  object-position: center top;
  display: block !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section .sxs-hero-clipper,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper,
body.sxs-search-open:not(.sxs-search-active) .sxs-ally-section__clipper.sxs-chips-revealed {
  height: 300px !important;
  max-height: none !important;
  overflow: hidden !important;
  position: relative !important;
  transform: none !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-hero-clipper,
body.sxs-search-open.sxs-search-active .sxs-ally-section__clipper {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  position: relative !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  right: auto !important;
}

body.sxs-search-open.sxs-search-active .sxs-ally-section .sxs-overlay-main {
  justify-content: flex-start !important;
  height: auto !important;
  max-height: none !important;
}

/* Minimum 16px — widget rows/chips were ~13–15px */
.sxs-ally-section .sxs-row__label,
.sxs-ally-section .sxs-row__body,
.sxs-ally-section .sxs-readmore,
.sxs-ally-section .sxs-cite,
.sxs-ally-section .sxs-chip-query,
.sxs-ally-section .sxs-disclaimer,
.sxs-ally-section .sxs-generating,
.sxs-ally-section .sxs-feedback,
.sxs-ally-section .sxs-text-btn,
.sxs-ally-section .sxs-typeahead__item,
.sxs-ally-section .sxs-conversation__count,
.sxs-ally-section .sxs-hero-chips__label,
.sxs-ally-section .sxs-hero-chip {
  font-size: 16px !important;
  line-height: 1.55;
}

.sxs-ally-section .sxs-row {
  align-items: start;
}

.sxs-ally-section .sxs-row__label {
  font-weight: 700;
  color: #111;
}

.sxs-ally-section .sxs-row__body {
  font-weight: 400;
  color: #3d3d45;
}