/* Virail assistant — chat thread + sticky composer (light + dark) */

/* Without this, width:100% + padding on content-box elements (e.g. .va-shell)
   renders wider than their container — the padding is added on top of the
   100% instead of being carved out of it, causing a horizontal overflow
   that document.body's own overflow-x:hidden only hides rather than fixes
   (found 2026-08-24: .va-shell measured 24px wider than the viewport). */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}
body.va-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.va-brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--va-teal-deep, #00757e);
  text-decoration: none;
}
.va-brand:hover {
  text-decoration: underline;
}


.va-page {
  --va-ink: var(--v-ink, #2d4156);
  --va-muted: #5a6d7c;
  --va-teal: var(--v-teal, #0099a4);
  --va-teal-deep: var(--v-teal-deep, #00757e);
  --va-accent: var(--va-teal-deep);
  /* Fixed (not themed) — for solid CTA backgrounds paired with white text.
     --va-teal-deep intentionally flips to a lighter tone in dark mode for
     text-on-dark-background use, which read at ~2.6:1 white-on-teal when
     reused as a button background (found 2026-08-25 auditing the signup
     CTA in dark mode — below even the 3:1 AA-large threshold). */
  --va-cta-bg: #00757e;
  --va-line: rgba(45, 65, 86, 0.1);
  --va-line-strong: rgba(45, 65, 86, 0.16);
  --va-glass: rgba(255, 255, 255, 0.88);
  --va-surface: rgba(255, 255, 255, 0.92);
  --va-surface-solid: #ffffff;
  --va-danger: #b42318;
  --va-warn: #b45309;
  --va-shadow: 0 8px 28px rgba(45, 65, 86, 0.08);
  --va-shadow-focus: 0 0 0 3px rgba(0, 153, 164, 0.18);
  --va-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --va-dur: 220ms;
  --va-dock-pad: 16px;
  --va-bg: #eef5f6;
  --va-map-opacity: 0.14;
  --va-glow-a: rgba(0, 153, 164, 0.3);
  --va-glow-b: rgba(0, 117, 126, 0.2);
  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
  color: var(--va-ink);
  font-family: "Rubik Variable", Rubik, -apple-system, "Segoe UI", sans-serif;
  background: var(--va-bg);
}

:root[data-theme="dark"] .va-page {
  --va-ink: #f0f0f0;
  --va-muted: #9eb4b8;
  --va-accent: #3ec4ce;
  --va-teal-deep: #2ab0ba;
  --va-line: rgba(232, 241, 243, 0.1);
  --va-line-strong: rgba(232, 241, 243, 0.16);
  --va-glass: rgba(26, 26, 26, 0.92);
  --va-surface: rgba(40, 40, 40, 0.94);
  --va-surface-solid: #282828;
  --va-danger: #f97066;
  --va-warn: #fdb022;
  --va-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  --va-shadow-focus: 0 0 0 3px rgba(62, 196, 206, 0.22);
  --va-bg: #1a1a1a;
  --va-map-opacity: 0.08;
  --va-glow-a: rgba(0, 153, 164, 0.22);
  --va-glow-b: rgba(232, 131, 107, 0.12);
  background: var(--va-bg);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .va-page {
    --va-ink: #f0f0f0;
    --va-muted: #9eb4b8;
    --va-accent: #3ec4ce;
    --va-teal-deep: #2ab0ba;
    --va-line: rgba(232, 241, 243, 0.1);
    --va-line-strong: rgba(232, 241, 243, 0.16);
    --va-glass: rgba(26, 26, 26, 0.92);
    --va-surface: rgba(40, 40, 40, 0.94);
    --va-surface-solid: #282828;
    --va-danger: #f97066;
    --va-warn: #fdb022;
    --va-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
    --va-shadow-focus: 0 0 0 3px rgba(62, 196, 206, 0.22);
    --va-bg: #1a1a1a;
    --va-map-opacity: 0.08;
    --va-glow-a: rgba(0, 153, 164, 0.22);
    --va-glow-b: rgba(232, 131, 107, 0.12);
    background: var(--va-bg);
    color-scheme: dark;
  }
}

.va-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.9;
  transition: opacity 0.4s var(--va-ease);
}

.va-shell--active .va-stage {
  opacity: 0.4;
}

.va-stage__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
}

.va-stage__glow--a {
  width: min(90vw, 640px);
  height: min(90vw, 640px);
  top: -18%;
  left: -16%;
  background: var(--va-glow-a);
}

.va-stage__glow--b {
  width: min(75vw, 520px);
  height: min(75vw, 520px);
  right: -18%;
  bottom: -8%;
  background: var(--va-glow-b);
}

.va-stage__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: var(--va-map-opacity);
  object-fit: cover;
  object-position: center 42%;
}

:root[data-theme="dark"] .va-stage__map {
  filter: invert(0.92) hue-rotate(160deg) brightness(0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .va-stage__map {
    filter: invert(0.92) hue-rotate(160deg) brightness(0.85);
  }
}

.va-shell {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  padding: 8px 16px 0;
  display: flex;
  flex-direction: column;
}

/* —— History rail (logged-in only: body.va-has-auth) —— */
.va-rail,
.va-rail-toggle,
.va-rail-backdrop {
  display: none;
}

body.va-has-auth .va-rail {
  display: flex;
}

body.va-has-auth .va-rail-toggle {
  display: inline-flex;
}

body.va-has-auth .va-rail-backdrop {
  display: none;
}

.va-rail-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--va-line-strong);
  border-radius: 12px;
  background: var(--va-glass);
  backdrop-filter: blur(12px);
  color: var(--va-ink);
  cursor: pointer;
  box-shadow: var(--va-shadow);
}
.va-rail-toggle:hover {
  border-color: var(--va-accent);
  color: var(--va-accent);
}
.va-rail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 20, 24, 0.35);
  border: 0;
}
.va-rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 35;
  width: min(280px, 86vw);
  height: 100%;
  flex-direction: column;
  gap: 8px;
  padding: 56px 12px 16px;
  background: color-mix(in srgb, var(--va-surface-solid) 92%, #0a3a40 8%);
  border-right: 1px solid var(--va-line);
  box-shadow: var(--va-shadow);
  transform: translateX(-105%);
  transition: transform var(--va-dur) var(--va-ease);
  overflow: hidden;
}
body.va-has-auth.va-rail-open .va-rail {
  transform: translateX(0);
}
body.va-has-auth.va-rail-open .va-rail-backdrop {
  display: block;
}
.va-rail__head {
  flex-shrink: 0;
}
.va-rail__new {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--va-line-strong);
  background: var(--va-surface);
  color: var(--va-ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.va-rail__new:hover {
  border-color: var(--va-accent);
  color: var(--va-accent);
}
.va-rail__section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.va-rail__label {
  margin: 4px 4px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--va-muted);
}
.va-rail__list {
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 2px;
}
.va-rail__empty {
  margin: 8px 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--va-muted);
}
.va-rail__row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-bottom: 2px;
}
.va-rail__item {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--va-ink);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}
.va-rail__item:hover {
  background: color-mix(in srgb, var(--va-accent) 10%, transparent);
}
.va-rail__item--on {
  background: color-mix(in srgb, var(--va-accent) 16%, transparent);
  font-weight: 600;
}
.va-rail__item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.va-rail__del {
  flex: 0 0 auto;
  width: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--va-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}
.va-rail__row:hover .va-rail__del,
.va-rail__del:focus-visible {
  opacity: 1;
}
.va-rail__del:hover {
  color: var(--va-danger);
  background: color-mix(in srgb, var(--va-danger) 10%, transparent);
}
.va-rail__foot {
  flex-shrink: 0;
  padding-top: 8px;
  border-top: 1px solid var(--va-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.va-rail__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--va-muted);
}
.va-rail__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--va-cta-bg);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.va-rail__cta:hover {
  filter: brightness(1.05);
}
.va-rail__ghost {
  border: 0;
  background: transparent;
  color: var(--va-muted);
  font-size: 13px;
  text-align: left;
  padding: 6px 4px;
  cursor: pointer;
}
.va-rail__ghost:hover {
  color: var(--va-ink);
}

@media (min-width: 960px) {
  body.va-page.va-has-auth {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
  }

  body.va-has-auth .va-stage {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  body.va-has-auth .va-rail {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    z-index: 2;
    width: 280px;
    height: 100%;
    min-height: 0;
    padding: 16px 12px;
    transform: none;
    box-shadow: none;
  }

  body.va-has-auth .va-rail-toggle,
  body.va-has-auth .va-rail-backdrop {
    display: none !important;
  }

  body.va-has-auth .va-shell {
    grid-column: 2;
    grid-row: 1;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    justify-self: center;
  }
}

.va-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0 10px;
  flex-wrap: wrap;
}

.va-top .hp-mode {
  margin: 0;
  background: var(--va-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--va-line-strong);
  box-shadow: var(--va-shadow);
}

.va-new-chat {
  font-size: 13px;
  font-weight: 600;
  color: var(--va-muted, #64748b);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.va-new-chat:hover {
  color: var(--va-fg, #0f172a);
  border-color: var(--va-line-strong, #e2e8f0);
  background: var(--va-glass, rgba(255, 255, 255, 0.5));
}

.va-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--va-muted);
  cursor: pointer;
  transition: background var(--va-dur) var(--va-ease), color var(--va-dur) var(--va-ease),
    border-color var(--va-dur) var(--va-ease);
}

.va-theme-toggle:hover {
  color: var(--va-accent);
  border-color: var(--va-line-strong);
  background: var(--va-glass);
}

.va-theme-toggle:focus-visible {
  outline: 2px solid var(--va-teal);
  outline-offset: 2px;
}

.va-theme-toggle__icon--sun {
  display: none;
}

:root[data-theme="dark"] .va-theme-toggle__icon--moon {
  display: none;
}
:root[data-theme="dark"] .va-theme-toggle__icon--sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .va-theme-toggle__icon--moon {
    display: none;
  }
  :root:not([data-theme="light"]) .va-theme-toggle__icon--sun {
    display: block;
  }
}

/* Groups the thread + composer so the empty state can center them together
   while .va-top stays pinned; on an active chat this behaves exactly like
   the old flat va-shell > va-thread + va-dock layout. */
.va-center-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Scrollable thread */
.va-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 8px 4px 16px;
  -webkit-overflow-scrolling: touch;
}

.va-empty {
  min-height: min(52dvh, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 32px 12px;
  animation: va-in 400ms var(--va-ease) both;
}

/* New chat: no messages yet — center the greeting + composer as one block
   in the remaining viewport space, ChatGPT/Claude-style, instead of pinning
   the composer to the bottom edge. Once a message is sent, .va-shell--active
   drops this and the composer returns to its normal docked position. */
.va-shell:not(.va-shell--active) .va-center-group {
  justify-content: center;
}

.va-shell:not(.va-shell--active) .va-thread {
  flex: 0 0 auto;
  overflow: visible;
  padding-bottom: 0;
}

.va-shell:not(.va-shell--active) .va-empty {
  min-height: 0;
  padding: 0 12px 28px;
}

.va-shell:not(.va-shell--active) .va-dock {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: none;
}

.va-shell--active .va-empty {
  display: none;
}

.va-hero-mark {
  width: 112px;
  height: 112px;
  border-radius: 32px;
  background: linear-gradient(180deg, #e8f6f8, #d4eef2);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 153, 164, 0.14);
  box-shadow: 0 14px 36px rgba(0, 153, 164, 0.22);
}

.va-hero-mark__mascot {
  width: 112px;
  height: 112px;
  margin: 0;
  filter: none;
  object-fit: cover;
  object-position: center 42%;
  pointer-events: none;
  user-select: none;
}

.va-hero-mark img {
  filter: none;
}

.va-avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
  object-position: center 30%;
  background: linear-gradient(180deg, #e8f6f8, #d4eef2);
  box-shadow: 0 2px 8px rgba(0, 153, 164, 0.22);
}

.va-msg--assistant {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  justify-items: start;
  width: min(100%, 640px);
}

.va-msg--assistant > .va-avatar {
  grid-column: 1;
  grid-row: 1;
  margin-top: 2px;
}

.va-msg--assistant > :not(.va-avatar) {
  grid-column: 2;
}

.va-hero-title {
  margin: 0;
  font-size: clamp(1.7rem, 4.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  max-width: 22ch;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.va-beta {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 153, 164, 0.12);
  color: #00757e;
  vertical-align: middle;
}

.va-hero-lead {
  margin: 0;
  color: var(--va-muted);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 28rem;
}

.va-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 2px 8px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.va-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: va-in 200ms var(--va-ease) both;
}

.va-msg--user {
  align-items: flex-end;
}

/* Mixed reply: prose + instruments read as one answer */
.va-msg--assistant > .va-bubble + .va-inst,
.va-msg--assistant > .va-inst + .va-bubble,
.va-msg--assistant > .va-inst + .va-inst {
  margin-top: 2px;
}

.va-msg--assistant > .va-bubble {
  max-width: min(100%, 560px);
}

.va-msg--assistant > .va-bubble + .va-inst {
  margin-top: 4px;
}

.va-msg--assistant > .va-inst + .va-bubble {
  margin-top: 6px;
  opacity: 0.95;
}

.va-msg--assistant > .va-bubble p {
  margin: 0 0 0.55em;
}

.va-msg--assistant > .va-bubble p:last-child {
  margin-bottom: 0;
}

.va-book--wide {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
}

.va-stay-teaser__lead {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--va-muted);
}

.va-inst--progress .va-inst__body {
  padding-top: 4px;
}

.va-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--va-line);
  overflow: hidden;
  margin-bottom: 12px;
}

.va-progress__bar {
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: var(--v-teal-grad, linear-gradient(90deg, #0099a4, #2ab0ba));
  animation: va-progress 1.4s var(--va-ease) infinite;
}

.va-progress__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--va-muted);
}

.va-progress__steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.va-progress__steps li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--va-line-strong);
  flex-shrink: 0;
}

.va-progress__steps li.is-on {
  color: var(--va-ink);
  font-weight: 600;
}

.va-progress__steps li.is-on::before {
  background: var(--va-teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--va-teal) 22%, transparent);
}

@keyframes va-progress {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.va-bubble {
  max-width: min(100%, 560px);
  padding: 12px 15px;
  border-radius: 12px;
  line-height: 1.55;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.va-msg--user .va-bubble {
  background: var(--va-teal);
  border: none;
  border-radius: 12px 12px 12px 4px;
  color: #fff;
}

.va-msg--assistant .va-bubble {
  background: color-mix(in srgb, var(--va-surface-solid) 88%, transparent);
  padding: 12px 15px;
  border-radius: 12px 12px 4px 12px;
  max-width: min(100%, 640px);
  color: var(--va-ink);
}

.va-bubble--streaming::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--va-teal);
  border-radius: 1px;
  animation: va-caret 0.9s steps(1) infinite;
}

@keyframes va-caret {
  50% {
    opacity: 0;
  }
}

.va-typing {
  display: inline-flex;
  gap: 5px;
  padding: 12px 4px;
}

.va-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--va-teal);
  opacity: 0.35;
  animation: va-dot 1.05s var(--va-ease) infinite;
}

.va-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.va-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

/* —— Instruments (ChatGPT-style rich blocks) —— */
.va-inst {
  width: 100%;
  max-width: 560px;
  margin: 4px 0 8px;
  border-radius: 18px;
  border: 1px solid var(--va-line);
  background: var(--va-surface);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--va-ink) 4%, transparent);
  overflow: hidden;
  animation: va-in 280ms var(--va-ease) both;
}

.va-inst__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--va-line);
}

.va-inst__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--va-teal) 14%, transparent);
  color: var(--va-accent);
}

.va-ico {
  width: 18px;
  height: 18px;
  display: block;
}

.va-inst__titles {
  min-width: 0;
  flex: 1;
}

.va-inst__title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.va-inst__kicker {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--va-muted);
}

.va-inst__body {
  padding: 10px 12px 12px;
}

.va-inst__map {
  margin: 0 0 10px;
}

.va-inst__more {
  display: inline-flex;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--va-accent);
  text-decoration: none;
}

.va-route-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 12px;
}

.va-route-strip__end {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.va-route-strip__end--to {
  align-items: flex-end;
  text-align: right;
}

.va-route-strip__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--va-teal);
}

.va-route-strip__dot--from {
  background: var(--va-teal);
}

.va-route-strip__dot--to {
  background: #fe6659;
  box-shadow: 0 0 0 2px #fe6659;
}

.va-route-strip__label {
  font-size: 0.8rem;
  font-weight: 650;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
  line-height: 1.25;
  word-break: break-word;
}

.va-route-strip__track {
  position: relative;
  height: 2px;
  width: min(120px, 28vw);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--va-teal) 70%, transparent),
    color-mix(in srgb, #fe6659 70%, transparent)
  );
}

.va-route-strip__pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--va-teal);
  animation: va-route-pulse 1.8s var(--va-ease) infinite;
}

@keyframes va-route-pulse {
  0% {
    left: 0;
    opacity: 0.2;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 8px);
    opacity: 0.2;
  }
}

.va-route-map {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--va-line);
  background: color-mix(in srgb, var(--va-teal) 6%, var(--va-surface-solid));
}

.va-route-map .maplibregl-ctrl-attrib {
  font-size: 9px;
  background: transparent !important;
}

/* Trip picks inside instrument */
.va-trips__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.va-trip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--va-line);
  background: var(--va-surface-solid);
  transition:
    border-color var(--va-dur) var(--va-ease),
    transform var(--va-dur) var(--va-ease);
}

.va-trip:hover {
  border-color: color-mix(in srgb, var(--va-teal) 45%, transparent);
}

.va-trip__rail {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.va-trip__mode {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--va-teal) 12%, transparent);
  color: var(--va-accent);
}

.va-trip__times {
  min-width: 0;
}

.va-trip-times {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.va-trip-times__arrow {
  flex: 1;
  max-width: 48px;
  height: 2px;
  border-radius: 999px;
  background: var(--va-line-strong);
  position: relative;
}

.va-trip-times__arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--va-muted);
  border-top: 2px solid var(--va-muted);
  transform: translateY(-50%) rotate(45deg);
}

.va-trip-meta {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--va-muted);
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.va-trip-meta--sub {
  margin-top: 2px;
  font-size: 0.72rem;
}

.va-trip-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.va-trip__badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--va-teal-deep);
  background: color-mix(in srgb, var(--va-teal) 16%, transparent);
  padding: 2px 7px;
  border-radius: 999px;
}

.va-trip-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--va-accent);
  font-size: 1.02rem;
}

.va-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 72px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--v-teal-grad, linear-gradient(180deg, #0099a4, #00757e));
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: filter var(--va-dur) var(--va-ease);
}

.va-book:hover {
  filter: brightness(1.06);
}

.va-book:focus-visible {
  outline: 2px solid var(--va-teal);
  outline-offset: 2px;
}

/* Horizontally scrollable card strip — same pattern as .va-pills, just
   wider items — rather than a page-length vertical stack of hotels. */
.va-hotels {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.va-hotels::-webkit-scrollbar {
  display: none;
}

.va-hotel {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 200px;
  padding: 8px;
  border-radius: 12px;
  background: var(--va-surface-solid);
  border: 1px solid var(--va-line);
}

.va-hotel__img,
.va-hotel__ph {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.va-hotel__ph {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--va-teal) 10%, transparent);
  color: var(--va-accent);
}

.va-hotel__body {
  flex: 1;
  min-width: 0;
  margin-top: 8px;
}

.va-hotel__name {
  font-weight: 650;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.va-hotel__meta {
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--va-muted);
}

.va-hotel__side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.va-hotel__price {
  font-weight: 700;
  color: var(--va-accent);
  font-size: 0.9rem;
}

.va-live__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
}

.va-live__badge {
  font-weight: 650;
  font-size: 0.78rem;
  color: var(--va-muted);
}

.va-live__badge.is-live {
  color: var(--va-accent);
}

.va-live__route {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.va-live__stops {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 6px;
  font-size: 0.8rem;
  border-left: 2px solid var(--va-line);
}

.va-live__stop {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  position: relative;
}

.va-live__stop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--va-teal);
  margin-left: -11px;
  box-shadow: 0 0 0 3px var(--va-surface);
}

.va-live__src {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--va-muted);
}

.va-board-scroll {
  overflow-x: auto;
}

.va-board__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.va-board__table th,
.va-board__table td {
  white-space: normal;
  word-break: break-word;
  text-align: left;
  padding: 6px 8px 6px 0;
  border-top: 1px solid var(--va-line);
}

.va-board__table th {
  font-weight: 600;
  color: var(--va-muted);
}

.va-board__table .is-late {
  color: var(--va-warn);
  font-weight: 650;
}

.va-place__ref {
  font-size: 0.8rem;
  color: var(--va-muted);
  background: color-mix(in srgb, var(--va-ink) 5%, transparent);
  padding: 4px 8px;
  border-radius: 8px;
}

.va-cal {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.va-cal::-webkit-scrollbar {
  display: none;
}

.va-cal-day {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 64px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--va-line);
  border-radius: 12px;
  background: var(--va-surface-solid);
  color: var(--va-ink);
  cursor: pointer;
  font: inherit;
  transition: border-color var(--va-dur) var(--va-ease), background var(--va-dur) var(--va-ease);
}

.va-cal-day.is-best {
  border-color: color-mix(in srgb, var(--va-teal) 55%, transparent);
  background: color-mix(in srgb, var(--va-teal) 10%, var(--va-surface-solid));
}

.va-cal-day:hover {
  border-color: color-mix(in srgb, var(--va-teal) 45%, transparent);
}

.va-cal-day:focus-visible {
  outline: 2px solid var(--va-teal);
  outline-offset: 2px;
}

.va-cal-day__d {
  font-size: 0.72rem;
  color: var(--va-muted);
}

.va-cal-day__p {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--va-accent);
}

/* Sticky dock */
.va-dock {
  flex-shrink: 0;
  padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent 0%, var(--va-bg) 32%);
}

.va-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.va-pills::-webkit-scrollbar {
  display: none;
}

.va-pills[hidden] {
  display: none;
}

.va-pill {
  flex: 0 0 auto;
  border: 1px solid var(--va-line);
  background: var(--va-surface);
  color: var(--va-ink);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--va-dur) var(--va-ease),
    border-color var(--va-dur) var(--va-ease),
    color var(--va-dur) var(--va-ease);
}

.va-pill:hover {
  background: var(--va-surface-solid);
  border-color: color-mix(in srgb, var(--va-teal) 50%, transparent);
  color: var(--va-accent);
}

.va-pill:focus-visible {
  outline: 2px solid var(--va-teal);
  outline-offset: 2px;
}

.va-pill--live {
  background: #e8836b;
  border-color: transparent;
  color: #fff;
}

.va-pill--live:hover {
  background: color-mix(in srgb, #e8836b 88%, #000);
  border-color: transparent;
  color: #fff;
}

.va-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 8px 8px 8px 16px;
  border-radius: 24px;
  background: var(--va-glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--va-line-strong);
  box-shadow: var(--va-shadow);
  transition: border-color var(--va-dur) var(--va-ease), box-shadow var(--va-dur) var(--va-ease);
}

.va-composer:focus-within {
  border-color: color-mix(in srgb, var(--va-teal) 55%, transparent);
  box-shadow: var(--va-shadow), var(--va-shadow-focus);
}

.va-composer textarea {
  width: 100%;
  resize: none;
  min-height: 48px;
  max-height: 140px;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--va-ink);
  outline: none;
}

.va-composer textarea::placeholder {
  color: color-mix(in srgb, var(--va-muted) 85%, transparent);
}

.va-send {
  border: 0;
  border-radius: 16px;
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--v-teal-grad, linear-gradient(180deg, #0099a4, #00757e));
  cursor: pointer;
  transition: filter var(--va-dur) var(--va-ease), opacity var(--va-dur) var(--va-ease);
}

.va-send:hover:not(:disabled) {
  filter: brightness(1.06);
}

.va-send:focus-visible {
  outline: 2px solid var(--va-teal);
  outline-offset: 2px;
}

.va-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.va-error {
  color: var(--va-danger);
  font-size: 0.8rem;
  padding: 0 4px 8px;
}

.va-error.hidden {
  display: none;
}

.va-link-row {
  margin: 6px 0 2px;
}

.va-link-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--va-cta-bg);
  color: #fff !important;
  font-weight: 650;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.va-muted {
  color: var(--va-muted);
  font-size: 0.85em;
}

.va-signup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--va-surface);
  border: 1px solid var(--va-line);
}

.va-signup__hint {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.va-signup__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--va-cta-bg);
  color: #fff !important;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

@keyframes va-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes va-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .va-typing span,
  .va-msg,
  .va-empty,
  .va-trip,
  .va-book,
  .va-pill,
  .va-send,
  .va-inst,
  .va-route-strip__pulse,
  .va-progress__bar {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  body.va-has-auth .va-shell {
    padding: 48px 12px 0;
  }

  body.va-has-auth .va-rail-toggle {
    top: 8px;
    left: 8px;
  }

  .va-shell {
    padding: 8px 12px 0;
  }

  .va-trip {
    padding: 12px;
  }
}

/* Full-bleed page chrome: kill LandingLayout white + footer band */
html:has(.va-page),
body:has(.va-page) {
  min-height: 100%;
  background: #eef5f6 !important;
}

:root[data-theme="dark"]:has(.va-page),
:root[data-theme="dark"]:has(.va-page) body {
  background: #0c1618 !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):has(.va-page),
  :root:not([data-theme="light"]):has(.va-page) body {
    background: #0c1618 !important;
  }
}

body:has(.va-page) .prod-main,
body:has(.va-page) .prod-main.bg-white {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: 0 !important;
  background: #eef5f6 !important;
}

body:has(.va-page) .prod-main > .site-navbar {
  flex-shrink: 0;
}

:root[data-theme="dark"] body:has(.va-page) .prod-main,
:root[data-theme="dark"] body:has(.va-page) .prod-main.bg-white {
  background: #0c1618 !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body:has(.va-page) .prod-main,
  :root:not([data-theme="light"]) body:has(.va-page) .prod-main.bg-white {
    background: #0c1618 !important;
  }
}

body:has(.va-page) .hp-prefooter,
body:has(.va-page) .hp-prefooter__spacer,
body:has(.va-page) .site-footer {
  display: none !important;
}

/* —— Trip panel + comparison (prototype) —— */
.va-trip-panel {
  display: none;
  flex-direction: column;
  width: min(340px, 36vw);
  border-left: 1px solid rgba(15, 50, 55, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  padding: 1rem 1rem 1.25rem;
  overflow: auto;
}
.va-trip-panel:not([hidden]) {
  display: flex;
}
.va-trip-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.va-trip-panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.va-trip-panel__status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}
.va-trip-panel__empty {
  margin: 0;
  opacity: 0.7;
  font-size: 0.9rem;
}
.va-trip-day {
  margin: 0 0 1rem;
}
.va-trip-day h3 {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
}
.va-trip-day ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.va-trip-seg {
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(15, 50, 55, 0.05);
}
.va-trip-seg__title {
  font-size: 0.92rem;
  font-weight: 600;
}
.va-trip-seg__meta {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-top: 0.15rem;
}
.va-cmp-card,
.va-trip-card {
  margin: 0.5rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--va-surface-solid, #fff);
  color: var(--va-ink, #0f3237);
  border: 1px solid var(--va-line, rgba(15, 50, 55, 0.1));
  box-shadow: var(--va-shadow, 0 8px 24px rgba(15, 50, 55, 0.06));
}
.va-cmp-card header h3,
.va-trip-card header h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--va-ink, #0f3237);
}
.va-cmp-meta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--va-muted, #5a7378);
  opacity: 1;
}
.va-cmp-scroll {
  overflow-x: auto;
}
.va-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: var(--va-ink, #0f3237);
}
.va-cmp-table th,
.va-cmp-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--va-line, rgba(15, 50, 55, 0.08));
  vertical-align: top;
  color: inherit;
}
.va-cmp-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--va-muted, #5a7378);
  opacity: 1;
  font-weight: 600;
}
.va-cmp-flags {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--va-warn, #b54708);
}
.va-cmp-sub {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--va-muted, #5a7378);
}
.va-cmp-row--pending {
  opacity: 0.72;
}
.va-cmp-loading {
  display: inline-block;
  width: 44px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--va-line-strong) 25%,
    var(--va-line) 50%,
    var(--va-line-strong) 75%
  );
  background-size: 200% 100%;
  animation: va-cmp-loading-sweep 1.3s ease-in-out infinite;
}
@keyframes va-cmp-loading-sweep {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .va-cmp-loading {
    animation: none;
    opacity: 0.5;
  }
}
.va-wait-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  opacity: 0.72;
  line-height: 1.35;
}
.va-inst--progress .va-progress__bar {
  animation: va-progress-pulse 1.4s ease-in-out infinite;
}
@keyframes va-progress-pulse {
  0% { width: 18%; }
  50% { width: 72%; }
  100% { width: 18%; }
}

@media (min-width: 1100px) {
  body.va-page {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
  }
  body.va-page .va-shell {
    grid-column: 2;
  }
  body.va-page .va-trip-panel:not([hidden]) {
    grid-column: 3;
    max-height: 100dvh;
    position: sticky;
    top: 0;
  }
}

@media (max-width: 1099px) {
  .va-trip-panel:not([hidden]) {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 40;
    width: min(360px, 92vw);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  }
}

