/*
 * Encore Transport public website visual contract
 *
 * This file is intentionally the last public Website layer.  The older
 * stylesheets contain historical page-specific overrides; keeping one final
 * contract here makes fields, cards, spacing and responsive behaviour
 * predictable without touching Passenger, Driver or Admin.
 */

:root {
  --website-ink: #082c42;
  --website-muted: #5e7a8b;
  --website-blue: #087ba8;
  --website-cyan: #2caadd;
  --website-ice: #ddf4fa;
  --website-line: #c9e0e9;
  --website-surface: #ffffff;
  --website-radius-card: 24px;
  --website-radius-control: 16px;
  --website-shadow-card: 0 18px 45px rgba(8, 44, 66, .12);
}

body:has(.public-topbar) {
  --website-font-ui: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --website-font-display: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --et-ui-font: var(--website-font-ui);
  --et-display-font: var(--website-font-display);
  --et-font-ui: var(--website-font-ui);
  --et-font-display: var(--website-font-display);
  --et-type-body: 1rem;
  --et-type-body-lg: 1rem;
  --et-type-eyebrow: .75rem;
  --et-type-control: .875rem;
  --et-type-caption: .75rem;
  --et-type-title-xl: 2.8rem;
  --et-type-title-lg: clamp(2rem, 3vw, 2.25rem);
  --et-type-title-md: clamp(1.25rem, 1.55vw, 1.375rem);
  color: var(--website-ink);
  background: #f5fafc;
  font-family: var(--website-font-ui);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: normal;
  overflow-x: hidden;
}

body:has(.public-topbar) *,
body:has(.public-topbar) *::before,
body:has(.public-topbar) *::after { box-sizing: border-box; }

/* Keep the reference site's type system as the final authority. The legacy
 * layers still carry Inter variables for Passenger/Admin, so scope this to
 * the public Website and its controls only. */
body:has(.public-topbar) :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--website-font-display);
}

body:has(.public-topbar) :is(p, small, label, a, button, input, select, textarea, strong, span) {
  font-family: var(--website-font-ui);
}

/* Some late legacy rules still reference --et-ui-font/--et-display-font and
 * bypass the public Website aliases. Resolve those tokens and pin every text
 * element to the same family, including menu subtitles and embedded SVG text. */
body:has(.public-topbar) :is(h1, h2, h3, h4, h5, h6, p, small, label, a, button, input, select, textarea, strong, span, li, summary, dt, dd, blockquote, figcaption, legend, th, td, caption, time, em, b, svg text) {
  font-family: var(--website-font-ui) !important;
}

/* Match the lighter reference typography across menu subtitles and planner
 * controls; legacy weights of 750–900 made these pieces look like another
 * type system even though their family was already unified. */
body:has(.public-topbar) .site-menu__panel strong { font-weight: 600; }
body:has(.public-topbar) .site-menu__panel small { font-weight: 500; }
body:has(.public-topbar) .site-page--trips .trip-search-card__header strong { font-weight: 600; }
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-label { font-weight: 600; }
body:has(.public-topbar) .site-page--trips .trip-search-card .website-select__value,
body:has(.public-topbar) .site-page--trips .trip-search-card input { font-weight: 600 !important; }
body:has(.public-topbar) .site-kicker,
body:has(.public-topbar) .public-section-label { font-weight: 700; }

/* One readable editorial scale across every public page. Older page sheets
 * set oversized headings independently, so this scoped contract is last. */
body:has(.public-topbar) h1 {
  font-size: 2.8rem !important;
  font-weight: 400 !important;
  line-height: .98 !important;
  letter-spacing: -.025em !important;
}

body:has(.public-topbar) h2 {
  font-size: 2rem !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em !important;
}

body:has(.public-topbar) h3 {
  font-size: 1.375rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: -.01em !important;
}

body:has(.public-topbar) :is(.public-nav a, .site-menu__button, .site-menu__panel a) {
  font-size: .875rem !important;
}

body:has(.public-topbar) :is(.booking-label, .site-kicker, .package-flow__state, .package-flow__status, .package-flow__eyebrow, .trip-steps-grid article > small) {
  font-size: .75rem !important;
}

body:has(.public-topbar) .package-flow__steps button {
  font-size: .8125rem !important;
}

/* The three service cards use their own supplied illustration as a soft,
 * decorative background layer. Text and the existing hover effects remain
 * above it, so each image adds character without reducing legibility. */
body:has(.public-topbar) .public-services-section .public-service-card {
  overflow: hidden;
  isolation: isolate;
}

body:has(.public-topbar) .public-services-section .public-service-card__background {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  opacity: .58;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

body:has(.public-topbar) .public-services-section .public-service-card:nth-child(1) .public-service-card__background {
  background-image: linear-gradient(100deg, rgba(255,255,255,.72), rgba(255,255,255,.3)), url("/assets/media/services-travel-background.png");
}

body:has(.public-topbar) .public-services-section .public-service-card:nth-child(2) .public-service-card__background {
  background-image: linear-gradient(100deg, rgba(255,255,255,.72), rgba(255,255,255,.3)), url("/assets/media/services-packages-background.png");
}

body:has(.public-topbar) .public-services-section .public-service-card:nth-child(3) .public-service-card__background {
  background-image: linear-gradient(100deg, rgba(255,255,255,.72), rgba(255,255,255,.3)), url("/assets/media/services-help-background.png");
}

body:has(.public-topbar) .public-services-section .public-service-card > :not(.public-service-card__background) {
  position: relative;
  z-index: 1;
}

body:has(.public-topbar) .public-services-section .public-service-card:hover .public-service-card__background,
body:has(.public-topbar) .public-services-section .public-service-card:focus-visible .public-service-card__background {
  opacity: .72;
  transform: scale(1.025);
}

body:has(.public-topbar) .shell {
  width: min(calc(100% - 48px), 1280px);
  margin-inline: auto;
}

/* Content must never depend on the reveal observer to exist.  Motion is an
 * enhancement; hidden content is not a valid loading state for a marketing
 * page or for a screenshot/SEO crawler. */
body:has(.public-topbar) [data-reveal] {
  opacity: 1;
  transform: none;
}

/* Header and menu interaction share one rounded language. */
body:has(.public-topbar) .public-topbar {
  width: 100vw !important;
  max-width: none !important;
  margin-inline: calc(50% - 50vw) !important;
  padding-inline: max(24px, calc((100vw - 1280px) / 2)) !important;
  min-height: 72px;
  padding-block: 10px;
}

@media (min-width: 901px) {
  /* Keep the navigation visually centered in the shell, independent of the
   * logo width or the language/account actions on either side. */
  body:has(.public-topbar) .public-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 24px;
    padding-inline: 0;
  }

  body:has(.public-topbar) .public-topbar .brand { min-width: 0; justify-self: start; }
  body:has(.public-topbar) .public-topbar .public-nav { justify-self: center; }
  body:has(.public-topbar) .public-topbar .public-topbar__actions { justify-self: end; }
}

/* Header reference contract: the preview uses a generous, light navigation
 * pill with 14px medium labels. Preserve the real menu groups, but give them
 * the same readable scale and breathing room instead of the compressed
 * historical 0.78rem/750 treatment. */
body:has(.public-topbar) .public-topbar .public-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid #e3edf2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px -18px rgba(7, 28, 46, .4);
}

body:has(.public-topbar) .public-topbar .public-nav > a,
body:has(.public-topbar) .public-topbar .public-nav > .site-menu > .site-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--website-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

body:has(.public-topbar) .public-topbar .public-nav > a:hover,
body:has(.public-topbar) .public-topbar .public-nav > a:focus-visible,
body:has(.public-topbar) .public-topbar .public-nav > .site-menu > .site-menu__button:hover,
body:has(.public-topbar) .public-topbar .public-nav > .site-menu > .site-menu__button:focus-visible,
body:has(.public-topbar) .public-topbar .public-nav > .site-menu.is-open > .site-menu__button {
  background: #e8f5fb;
  color: var(--website-blue);
}

body:has(.public-topbar) .public-topbar .public-nav .site-menu__panel {
  width: 300px;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 24px 48px -20px rgba(7, 28, 46, .35);
}

body:has(.public-topbar) .public-topbar .public-nav .site-menu__panel a {
  padding: 12px 14px;
  border-radius: 10px;
}

body:has(.public-topbar) .public-topbar .public-nav .site-menu__panel strong { font-size: 14px; font-weight: 600; }
body:has(.public-topbar) .public-topbar .public-nav .site-menu__panel small { font-size: 13px; }

body:has(.public-topbar) .public-topbar .public-nav,
body:has(.public-topbar) .public-topbar .public-nav a,
body:has(.public-topbar) .public-topbar .site-menu__button,
body:has(.public-topbar) .public-topbar .public-account-link,
body:has(.public-topbar) .public-topbar .public-passenger-link {
  border-radius: 999px;
}

body:has(.public-topbar) .public-topbar .public-nav a,
body:has(.public-topbar) .public-topbar .site-menu__button {
  min-height: 38px;
  padding-inline: 12px;
}

body:has(.public-topbar) .public-topbar .site-menu__panel {
  z-index: 50;
  border: 1px solid var(--website-line);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(8, 44, 66, .18);
}

body:has(.public-topbar) .public-topbar .site-menu__panel a {
  border-radius: 12px;
}

/* Match the preview's 55px pill and 41px menu targets. Keep this after the
 * historical compact rule below so the menu cannot shrink again. */
body:has(.public-topbar) .public-topbar .public-nav > a,
body:has(.public-topbar) .public-topbar .public-nav > .site-menu > .site-menu__button {
  min-height: 41px;
  padding-inline: 16px;
}

body:has(.public-topbar) .public-topbar .public-nav {
  min-height: 55px;
}

/* Shared page rhythm: every section gets breathing room and the footer is
 * visually separated instead of touching the last content block. */
body:has(.public-topbar) .site-page > section,
body:has(.public-topbar) .site-page > .site-page__section { min-width: 0; }

/* Give the terminal list and its planning note a clear visual break. */
body:has(.public-topbar) .site-page--routes .routes-planning-note {
  margin-top: clamp(24px, 5vw, 72px);
}

body:has(.public-topbar) .site-page--routes .routes-next-section {
  margin-top: clamp(24px, 5vw, 72px);
}

body:has(.public-topbar) .public-footer {
  margin-top: clamp(56px, 8vw, 112px);
  border-top: 1px solid rgba(8, 44, 66, .14);
}

body:has(.public-topbar) .public-footer__grid,
body:has(.public-topbar) .public-footer__intro,
body:has(.public-topbar) .public-footer__legal,
body:has(.public-topbar) .public-footer__bottom { width: min(calc(100% - 48px), 1280px); }

/* Buttons and links are controls, not unbounded text. */
body:has(.public-topbar) :is(.button, button, .btn, .public-search-button) {
  min-height: 48px;
  /* Cross-surface controls use the project's canonical 12px radius. Fields
   * keep the softer 16px treatment below; the header remains pill-shaped. */
  border-radius: 12px;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

body:has(.public-topbar) :is(.button, button, .btn, .public-search-button):hover:not(:disabled),
body:has(.public-topbar) :is(.button, button, .btn, .public-search-button):focus-visible {
  transform: translateY(-1px);
}

/* Booking planner: one stable desktop row, wide route fields, fixed control
 * heights and no clipped labels while data is loading. */
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.3fr)
    48px
    minmax(180px, 1.3fr)
    minmax(150px, 1fr)
    minmax(136px, .86fr)
    minmax(147px, 1fr);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--website-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--website-shadow-card);
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__details {
  display: contents;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-swap {
  min-width: 0;
  height: 78px;
  min-height: 78px;
}

/* Route selectors need more horizontal room and a shorter profile than the
 * date, passenger and submit controls. */
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .booking-field {
  align-self: center;
  height: 68px;
  min-height: 68px;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  overflow: visible;
  border: 1px solid var(--website-line);
  border-radius: 16px;
  background: #f8fafc;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-label__icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--website-blue);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-label > span:last-child {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field select,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__trigger,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--website-ink);
  font: inherit;
  font-size: .98rem;
  font-weight: 800;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 38px;
  height: 38px;
  padding: 0 2px;
  color: #334155;
  text-align: left;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__value {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__value.is-loading {
  color: #7893a0;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-swap {
  align-self: center;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--website-line);
  border-radius: 50%;
  background: #f3fbfd;
  color: var(--website-blue);
  font-size: 1.3rem;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 16px;
  overflow: visible;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--website-cyan), #168ec1);
  color: #fff;
  box-shadow: 0 12px 24px rgba(44, 170, 221, .22);
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button [data-action-label] {
  display: inline;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

/* The custom menu is used where native select styling cannot be controlled.
 * Keep it above cards and inside the field's visual language. */
body:has(.public-topbar) .website-select__menu {
  z-index: 2000;
  max-height: min(320px, 45vh);
  overflow-y: auto;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--website-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(8, 44, 66, .18);
}

body:has(.public-topbar) .website-select__option {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 8px;
}

body:has(.public-topbar) .website-select__option:hover,
body:has(.public-topbar) .website-select__option[aria-selected="true"] {
  background: var(--website-ice);
  color: var(--website-ink);
}

body:has(.public-topbar) .website-date-picker__day {
  border-radius: 50%;
}

/* Page sections use their available width rather than a narrow column. */
body:has(.public-topbar) .site-page > section > .shell,
body:has(.public-topbar) .site-page > .site-page__section > .shell {
  min-width: 0;
}

body:has(.public-topbar) .site-page :is(h1, h2, h3) { overflow-wrap: normal; }
body:has(.public-topbar) .site-page :is(p, small, strong, a) { overflow-wrap: anywhere; }

/* Trips guidance: artwork is a full-card, low-opacity background, not a
 * detached thumbnail.  The three cards remain distinct by tint. */
body:has(.public-topbar) .site-page--trips .trip-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

body:has(.public-topbar) .site-page--trips .trip-steps-grid article {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--website-line);
  border-radius: var(--website-radius-card);
  background: #eef8fb;
  box-shadow: 0 12px 28px rgba(8, 44, 66, .08);
}

body:has(.public-topbar) .site-page--trips .trip-steps-grid article::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(255,255,255,.84) 18%, rgba(255,255,255,.62) 100%);
}

body:has(.public-topbar) .site-page--trips .trip-step-card__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  opacity: .24;
  filter: saturate(.82) contrast(.94);
}

body:has(.public-topbar) .site-page--trips .trip-steps-grid article > :not(.trip-step-card__art) {
  position: relative;
  z-index: 1;
}

body:has(.public-topbar) .site-page--trips .trip-steps-grid article > div {
  margin-top: auto;
}

/* Help answers are expandable rows.  Expanded text must grow the row rather
 * than being clipped by a fixed-height card. */
body:has(.public-topbar) .site-page--help .help-faq-list details {
  min-height: 0;
  overflow: visible;
  border-radius: 16px;
}

body:has(.public-topbar) .site-page--help .help-faq-list summary {
  min-height: 72px;
  padding: 18px 22px;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.35;
}

body:has(.public-topbar) .site-page--help .help-faq-list details > p {
  max-width: 78ch;
  margin: 0;
  padding: 0 22px 22px;
  font-size: 1rem;
  line-height: 1.65;
}

/* Routes directory search explicitly communicates that it is searchable. */
body:has(.public-topbar) .routes-filter__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--website-blue);
  font-weight: 900;
}

body:has(.public-topbar) .routes-filter__label-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Package induction carousel: blue Encore palette only, with a stable
 * two-column stage and accessible touch/keyboard controls already supplied by
 * premium-interactions.mjs. */
body:has(.public-topbar) .site-page--packages .package-flow {
  overflow: hidden;
  border-color: rgba(44, 170, 221, .32);
  border-radius: 26px;
  background: linear-gradient(145deg, #f8fdff, #edf8fb);
  box-shadow: var(--website-shadow-card);
}

body:has(.public-topbar) .site-page--packages .package-flow__body {
  display: block;
  min-height: 270px;
  overflow: hidden;
}

body:has(.public-topbar) .site-page--packages .package-flow__track {
  display: flex;
  width: 100%;
  transition: transform 480ms cubic-bezier(.22, .61, .36, 1);
  touch-action: pan-y;
  will-change: transform;
}

body:has(.public-topbar) .site-page--packages .package-flow__slide {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .78fr);
  gap: 28px;
  min-height: 270px;
  align-items: center;
}

body:has(.public-topbar) .site-page--packages .package-flow__copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

body:has(.public-topbar) .site-page--packages .package-flow__visual {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 12px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 35%, rgba(44,170,221,.2), transparent 68%);
}

body:has(.public-topbar) .site-page--packages .package-flow__visual img {
  width: min(100%, 310px);
  height: 220px;
  object-fit: contain;
}

body:has(.public-topbar) .site-page--packages .package-flow__progress { background: #c9eaf3; }
body:has(.public-topbar) .site-page--packages .package-flow__progress span {
  background: var(--website-cyan);
  transition: width 480ms cubic-bezier(.22, .61, .36, 1);
}
body:has(.public-topbar) .site-page--packages .package-flow__steps button.is-active,
body:has(.public-topbar) .site-page--packages .package-flow__steps button:hover,
body:has(.public-topbar) .site-page--packages .package-flow__action { color: var(--website-blue); }

@media (min-width: 1181px) {
  /* The trips page places the form inside a padded planner card. Use a
   * slightly tighter desktop track there so the CTA remains inside the card
   * while origin and destination still receive the largest columns. */
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns:
      minmax(180px, 1.28fr)
      42px
      minmax(180px, 1.28fr)
      minmax(130px, .95fr)
      minmax(100px, .72fr)
      minmax(130px, .95fr);
    gap: 6px;
  }
}

@media (min-width: 1181px) and (max-width: 1300px) {
  /* At compact desktop widths the planner card still stays horizontal, but
   * its inner form is narrower than the page-wide search bar. Keep every
   * track inside the form's content box instead of allowing the CTA to
   * escape the card. */
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns:
      minmax(180px, 1.2fr)
      36px
      minmax(180px, 1.2fr)
      minmax(120px, .95fr)
      minmax(90px, .9fr)
      minmax(124px, .95fr);
    gap: 6px;
  }
}

/* Footer legal rows and cards share the same separation and radius. */
body:has(.public-topbar) .public-footer__legal details,
body:has(.public-topbar) .site-card,
body:has(.public-topbar) .routes-network-card,
body:has(.public-topbar) .routes-terminal-panel,
body:has(.public-topbar) .contact-path,
body:has(.public-topbar) .site-form-shell { border-radius: var(--website-radius-card); }

@media (max-width: 1180px) and (min-width: 901px) {
  body:has(.public-topbar) .shell { width: min(calc(100% - 36px), 1120px); }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns: minmax(150px, 1.2fr) 42px minmax(150px, 1.2fr) minmax(118px, .9fr) minmax(104px, .72fr) minmax(154px, 1fr);
    gap: 8px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field { padding-inline: 11px; }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-label { font-size: .68rem; }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button { padding-inline: 10px; }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-label { letter-spacing: .04em; }
}

@media (max-width: 900px) {
  body:has(.public-topbar) .shell,
  body:has(.public-topbar) .public-footer__grid,
  body:has(.public-topbar) .public-footer__intro,
  body:has(.public-topbar) .public-footer__legal,
  body:has(.public-topbar) .public-footer__bottom { width: min(calc(100% - 32px), 720px); }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route,
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 10px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button { width: 100%; }
  body:has(.public-topbar) .site-page--trips .trip-steps-grid { grid-template-columns: 1fr; }
  body:has(.public-topbar) .site-page--packages .package-flow__slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-block: 18px;
  }
  body:has(.public-topbar) .site-page--packages .package-flow__visual { min-height: 170px; }
}

@media (max-width: 640px) {
  body:has(.public-topbar) {
    --et-type-title-xl: clamp(2rem, 9vw, 2.8rem);
    --et-type-title-lg: clamp(1.75rem, 7vw, 2rem);
    --et-type-title-md: 1.25rem;
  }

  body:has(.public-topbar) h1 { font-size: clamp(2rem, 9vw, 2.8rem) !important; }
  body:has(.public-topbar) h2 { font-size: clamp(1.75rem, 7vw, 2rem) !important; }
  body:has(.public-topbar) h3 { font-size: 1.25rem !important; }

  body:has(.public-topbar) .public-topbar { min-height: 64px; }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route,
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__details { grid-template-columns: 1fr; }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-swap { justify-self: center; width: 48px; }
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field,
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button { height: 82px; min-height: 82px; }
  body:has(.public-topbar) .site-page--trips .trip-steps-grid article { min-height: 230px; padding: 22px; }
  body:has(.public-topbar) .site-page--help .help-faq-list summary { padding-inline: 16px; }
  body:has(.public-topbar) .site-page--help .help-faq-list details > p { padding-inline: 16px; }
  body:has(.public-topbar) .public-footer { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.public-topbar) :is(.button, button, .btn, .public-search-button) { transition: none; }
  body:has(.public-topbar) .package-flow__track { transition: none; }
}

/* Origin and destination are the primary booking choices. Give both route
 * fields more of the desktop row and a less boxy height, while preserving
 * the date, passenger and submit tracks. This shared rule covers the home
 * search and the Trips planner wherever this selector is rendered. */
@media (min-width: 1181px) {
  body:has(.public-topbar) .public-booking .public-booking-card {
    width: min(100%, 1040px);
    grid-template-columns: minmax(200px, 2.35fr) 40px minmax(200px, 2.35fr) 150px 136px 147px;
    gap: 10px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-layout {
    grid-template-columns: minmax(240px, .22fr) minmax(0, .78fr);
    gap: clamp(24px, 2vw, 32px);
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card {
    width: min(100%, 1040px);
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns:
      minmax(190px, 1.55fr)
      40px
      minmax(190px, 1.55fr)
      minmax(150px, 1fr)
      minmax(136px, .86fr)
      minmax(147px, 1fr);
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns:
      minmax(176px, 1.62fr)
      36px
      minmax(176px, 1.62fr)
      minmax(130px, .95fr)
      minmax(100px, .72fr)
      minmax(130px, .95fr);
    gap: 5px;
  }
}

/* Home hero reference image: keep the existing corporate copy and live trip
 * interactions while using the supplied bus artwork as the hero backdrop. */
body:has(.public-topbar) .public-hero {
  background-color: #082c42;
  background-image: url("../../assets/media/home-hero-reference.png");
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 56px rgba(70, 91, 105, .34);
}

body:has(.public-topbar) .public-hero::before {
  background: linear-gradient(90deg, rgba(4, 27, 43, .28) 0%, rgba(4, 27, 43, .12) 42%, transparent 75%);
}

/* Contact path PNGs replace the earlier CSS-drawn placeholder icons. */
body:has(.public-topbar) .site-page--contact .contact-path__icon::before,
body:has(.public-topbar) .site-page--contact .contact-path__icon::after {
  content: none !important;
  display: none !important;
}

/* Let the route illustration sit directly in the section background instead
 * of inside the framed blue tile. */
body:has(.public-topbar) .routes-discovery__visual {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 58% 52%, rgba(44, 170, 221, .14), transparent 68%);
  box-shadow: none;
}

body:has(.public-topbar) .routes-discovery__visual::before,
body:has(.public-topbar) .routes-discovery__visual::after {
  display: none;
}

body:has(.public-topbar) .routes-discovery__visual img {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 22px 22px rgba(8, 44, 66, .12));
}

/* Retain the blue-grey depth beneath the hero as the search bar overlaps it. */
body:has(.public-topbar) .public-booking .public-booking-card {
  border-radius: 30px;
  box-shadow: 0 24px 50px rgba(57, 78, 94, .28);
}

body:has(.public-topbar) .public-booking .public-booking-card__route .booking-field {
  min-height: 76px;
  height: 76px;
  border-radius: 28px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #fff, #f3f9fc);
}

body:has(.public-topbar) .public-booking .public-booking-card__route .website-select__trigger {
  border-radius: 22px;
}

@media (max-width: 900px) {
  body:has(.public-topbar) .public-hero {
    background-position: 62% center;
  }

  body:has(.public-topbar) .public-hero::before {
    background: linear-gradient(180deg, rgba(4, 27, 43, .24), rgba(4, 27, 43, .1) 50%, rgba(4, 27, 43, .38));
  }
}

/* Trips planner: balanced route and search columns, with a compact content-
 * driven height. This is deliberately scoped to /website/trips/ so the home
 * booking bar keeps its separate horizontal composition. */
body:has(.public-topbar) .site-page--trips .trip-search-card {
  padding: 24px 28px;
  border-radius: 24px;
}

body:has(.public-topbar) .site-page--trips .trip-search-card__header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 0;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "route details";
  align-items: stretch;
  gap: 24px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route {
  position: relative;
  display: grid;
  grid-area: route;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 76px 32px 76px;
  gap: 0;
  min-width: 0;
  align-items: center;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 1px;
  background: #d8eaf1;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route > .booking-field:first-child { grid-row: 1; }
body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route > .public-swap { grid-row: 2; }
body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route > .booking-field:last-child { grid-row: 3; }

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route .booking-field {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 76px;
  min-height: 76px;
  padding: 11px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f5fafc);
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-swap {
  z-index: 2;
  justify-self: center;
  align-self: center;
  width: 56px;
  height: 56px;
  min-height: 56px;
  border: 1px solid #d4e8f0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 16px rgba(8, 44, 66, .1);
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details {
  display: grid;
  grid-area: details;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 76px 76px;
  gap: 16px;
  min-width: 0;
  align-content: center;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details .booking-field {
  width: 100%;
  height: 76px;
  min-height: 76px;
  padding: 11px 16px;
  border-radius: 22px;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .booking-label {
  gap: 7px;
  white-space: nowrap;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-search-button {
  grid-column: 1 / -1;
  width: 100%;
  height: 76px;
  min-height: 76px;
  border-radius: 12px;
}

@media (max-width: 1100px) {
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "route" "details";
    gap: 18px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route,
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details {
    width: 100%;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 76px 32px 76px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-label {
    font-size: .68rem;
  }
}

@media (max-width: 900px) {
  body:has(.public-topbar) .site-page--trips .trip-search-card { padding: 22px; }
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "route" "details";
    gap: 18px;
  }
}

@media (max-width: 560px) {
  body:has(.public-topbar) .site-page--trips .trip-search-card { padding: 18px; }
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details .booking-field,
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-search-button {
    padding-inline: 12px;
  }
}

/* About hero: reserve separate space for the callout and the illustration so
 * the speech bubble no longer covers the phone, coach and parcel artwork. */
body:has(.public-topbar) .site-page--about .about-intro__visual {
  min-height: 430px;
  padding: 24px 18px 54px;
}

body:has(.public-topbar) .site-page--about .about-intro__art {
  inset: 24px 8px 68px;
}

body:has(.public-topbar) .site-page--about .about-intro__art .about-intro__fallback {
  width: min(100%, 430px);
  max-height: 270px;
  object-fit: contain;
}

body:has(.public-topbar) .site-page--about .about-speech-bubble {
  display: none;
}

body:has(.public-topbar) .site-page--about .about-speech-bubble__dot { margin-bottom: 10px; }
body:has(.public-topbar) .site-page--about .about-speech-bubble p { margin-top: 6px; }

@media (max-width: 700px) {
  body:has(.public-topbar) .site-page--about .about-intro__visual { min-height: 390px; }
  body:has(.public-topbar) .site-page--about .about-intro__art { inset: 18px 0 68px; }
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .booking-field {
  height: 76px;
  min-height: 76px;
  border-radius: 24px;
  overflow: hidden;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .website-select__trigger {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 18px;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .website-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .booking-field {
    height: auto;
    min-height: 82px;
    padding-block: 12px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .website-select__trigger {
    height: auto;
    min-height: 36px;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns: minmax(170px, 1.55fr) 38px minmax(170px, 1.55fr) minmax(118px, .9fr) minmax(104px, .72fr) minmax(154px, 1fr);
  }

  /* At tablet landscape the home form uses two rows; keep its route pair
   * generous and leave the second row controls untouched. */
  body:has(.public-topbar) .public-booking .public-booking-card {
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  }

  /* The Trips planner is stacked at this tier. Keep its route pair on one
   * generous row and preserve the existing three detail controls below. */
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns: minmax(0, 1fr);
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
    gap: 8px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(104px, .72fr) minmax(154px, 1fr);
    gap: 8px;
  }
}

@media (max-width: 900px) {
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .booking-field {
    height: 68px;
    min-height: 68px;
  }
}

/* The supplied coach artwork adds a quiet travel cue to the package callout.
 * Its own layer is faded and feathered, so the text and existing button stay
 * crisp while the former plain gradient remains as the color wash. */
body:has(.public-topbar) .parcel-feature {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 83% 50%, rgba(46, 184, 231, .16), transparent 25%),
    linear-gradient(110deg, #ffffff 0%, #f2fbfe 66%, #e1f4fb 100%);
}

body:has(.public-topbar) .parcel-feature::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: url("../../assets/media/package-tracking-background.png");
  background-repeat: no-repeat;
  background-position: right 4% center;
  background-size: cover;
  opacity: .34;
  -webkit-mask-image: linear-gradient(90deg, transparent 10%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 10%, #000 42%);
  pointer-events: none;
}

/* Parcel services: let the supplied transparent box illustration sit on the
 * white hero card without the blue tile that previously boxed it in. */
body:has(.public-topbar) .site-page--packages .package-journey-visual__art {
  height: 250px;
  margin: -18px auto 10px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

body:has(.public-topbar) .site-page--packages .package-journey-visual {
  background: #fff;
}

body:has(.public-topbar) .site-page--packages .package-journey-visual__art img {
  width: min(100%, 360px);
  height: 360px;
  transform: translateY(-42px);
  object-fit: contain;
}

@media (max-width: 640px) {
  body:has(.public-topbar) .parcel-feature::before {
    background-position: 58% center;
    background-size: cover;
    opacity: .22;
    -webkit-mask-image: linear-gradient(90deg, transparent 4%, #000 48%);
    mask-image: linear-gradient(90deg, transparent 4%, #000 48%);
  }
}

/* Soft full-card artwork for the parcel handoff checklist. */
body:has(.public-topbar) .site-page--packages .package-checklist article {
  position: relative;
  isolation: isolate;
  grid-template-rows: 1fr;
  align-items: center;
  min-height: 190px;
  overflow: hidden;
  border-radius: 20px;
}

body:has(.public-topbar) .site-page--packages .package-checklist article::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: .22;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 62%);
  pointer-events: none;
}

body:has(.public-topbar) .site-page--packages .package-checklist article:nth-child(1)::before {
  background-image: url("/assets/media/packages-recipient-background.png");
}

body:has(.public-topbar) .site-page--packages .package-checklist article:nth-child(2)::before {
  background-image: url("/assets/media/packages-content-background.png");
}

body:has(.public-topbar) .site-page--packages .package-checklist article:nth-child(3)::before {
  background-image: url("/assets/media/packages-route-background.png");
}

body:has(.public-topbar) .site-page--packages .package-checklist article:nth-child(4)::before {
  background-image: url("/assets/media/packages-tracking-background.png");
}

body:has(.public-topbar) .site-page--packages .package-checklist__visual {
  display: none;
}

body:has(.public-topbar) .site-page--packages .package-checklist article > span,
body:has(.public-topbar) .site-page--packages .package-checklist article > div:last-child {
  position: relative;
  z-index: 1;
}

body:has(.public-topbar) .site-page--packages .package-checklist article > div:last-child {
  grid-column: 2;
}

@media (max-width: 640px) {
  body:has(.public-topbar) .site-page--packages .package-checklist article {
    min-height: 160px;
    padding: 18px;
  }

  body:has(.public-topbar) .site-page--packages .package-checklist article::before {
    background-position: 62% center;
    opacity: .18;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 72%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 72%);
  }
}

/* Figma route selector standard: make origin and destination the two lead
 * fields, keep the swap control between them, and fit the supporting fields
 * and search action into the same clean desktop row. */
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns:
    minmax(160px, 1.32fr)
    44px
    minmax(160px, 1.32fr)
    minmax(150px, 1.08fr)
    minmax(142px, .94fr)
    minmax(138px, 1fr) !important;
  grid-template-areas: none !important;
  grid-auto-flow: row !important;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 48px rgba(51, 83, 103, .2);
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__details {
  display: contents !important;
}

body:has(.public-topbar) .public-booking .booking-card > .public-booking-card__route,
body:has(.public-topbar) .public-booking .booking-card > .public-booking-card__details,
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-card > .public-booking-card__route,
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-card > .public-booking-card__details {
  display: contents !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route,
body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details {
  position: static !important;
  grid-area: auto !important;
  grid-template-areas: none !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  gap: 0 !important;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route::before {
  content: none !important;
  display: none !important;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route > .booking-field,
body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__route > .public-swap,
body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details > .booking-field,
body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card__details > .public-search-button {
  grid-area: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button {
  box-sizing: border-box;
  height: 76px;
  min-height: 76px;
  border-radius: 22px;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .booking-field {
  height: 76px;
  min-height: 76px;
  padding-inline: 16px;
  border-radius: 22px;
  background: #f7fafc;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-label {
  gap: 8px;
  color: #526b7e;
  font-size: .72rem;
  font-weight: 750 !important;
  letter-spacing: .045em;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__trigger {
  width: 100%;
  min-width: 0;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__trigger {
  height: 38px;
  min-height: 38px;
  padding-inline: 0;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .website-select__value,
body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field input {
  color: #102f43;
  font-size: .94rem;
  font-weight: 650 !important;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-swap {
  width: 44px;
  height: 44px;
  min-height: 44px;
  justify-self: center;
  border: 1px solid #cfe2eb;
  background: #f2f9fc;
  box-shadow: none;
}

body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button {
  width: 100%;
  min-width: 0;
  padding-inline: 14px;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 700;
}

body:has(.public-topbar) .site-page--trips .trip-search-layout {
  grid-template-columns: minmax(220px, .34fr) minmax(0, 1.66fr);
  gap: clamp(24px, 3vw, 44px);
}

body:has(.public-topbar) .site-page--trips .trip-search-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: clamp(20px, 2vw, 28px);
  border-radius: 28px;
}

@media (min-width: 901px) and (max-width: 1180px) {
  body:has(.public-topbar) .site-page--trips .trip-search-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-intro {
    max-width: 680px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns:
      minmax(145px, 1.25fr) 40px minmax(145px, 1.25fr)
      minmax(132px, 1fr) minmax(142px, .98fr) minmax(130px, 1fr) !important;
    gap: 7px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns:
      minmax(138px, 1.2fr) 38px minmax(138px, 1.2fr)
      minmax(128px, 1fr) minmax(122px, .9fr) minmax(124px, 1fr) !important;
    gap: 6px;
    padding: 10px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field,
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button {
    height: 72px;
    min-height: 72px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-swap {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields,
  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
    display: grid !important;
    gap: 8px !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields > .public-search-button {
    grid-column: 1 / -1 !important;
  }
}

/* Encore cursor set: a clear arrow with a small star, and a friendly hand
   over controls. Editing fields and touch devices retain their native cues. */
body:has(.public-topbar),
body:has(.public-topbar) * {
  cursor: url("/assets/media/encore-cursor.svg") 3 2, auto;
}

body:has(.public-topbar) :is(a[href], button, summary, select, [role="button"], [role="tab"], [role="menuitem"], input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"]) {
  cursor: url("/assets/media/encore-cursor-link.svg") 9 6, pointer;
}

body:has(.public-topbar) :is(input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, [contenteditable="true"], [role="textbox"]) {
  cursor: text;
}

body:has(.public-topbar) :is(button:disabled, [aria-disabled="true"]) {
  cursor: not-allowed;
}

@media (pointer: coarse), (forced-colors: active) {
  body:has(.public-topbar),
  body:has(.public-topbar) * {
    cursor: auto;
  }

  body:has(.public-topbar) :is(a[href], button, summary, select, [role="button"], [role="tab"], [role="menuitem"], input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"]) {
    cursor: pointer;
  }

  body:has(.public-topbar) :is(input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, [contenteditable="true"], [role="textbox"]) {
    cursor: text;
  }
}

/* Contact paths already use branded illustrations. Remove the legacy CSS
   glyphs that were being drawn on top of those images. */
.contact-path__icon::before,
.contact-path__icon::after {
  content: none !important;
  display: none !important;
}

/* The route artwork is intentionally oversized for a gentle crop. Clip that
   crop at its own frame so it cannot create sideways scrolling on phones. */
.routes-planning-note__art {
  overflow: hidden;
}

@media (max-width: 640px) {
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
    padding: 12px;
    border-radius: 22px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route,
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__details {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-booking-card__route .public-swap {
    justify-self: center;
    transform: rotate(90deg);
  }

  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .booking-field,
  body:has(.public-topbar) :is(.public-booking, .trip-search-card) .public-search-button {
    height: 72px;
    min-height: 72px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card {
    padding: 18px;
    border-radius: 24px;
  }
}

/* The Trips planner uses dedicated wrappers so its old route/details grid
 * areas cannot override the standardized six-control desktop row. */
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields,
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
  display: contents !important;
  position: static !important;
  grid-area: auto !important;
  grid-template-areas: none !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  gap: 0 !important;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields::before {
  content: none !important;
  display: none !important;
}

body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields > .booking-field,
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields > .public-swap,
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields > .booking-field,
body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields > .public-search-button {
  grid-area: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

@media (max-width: 640px) {
  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields,
  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields,
  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
    display: grid !important;
    gap: 8px !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields > .public-search-button {
    grid-column: 1 / -1 !important;
  }
}

/* Locale menu follows the spacious EN/ES switcher from the Figma preview. */
body:has(.public-topbar) .public-topbar .locale-switcher .website-select {
  width: 84px;
}

body:has(.public-topbar) .locale-switcher .website-select__trigger {
  box-sizing: border-box;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 15px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
}

body:has(.public-topbar) .website-select__menu--locale {
  gap: 5px;
  padding: 8px;
  border-radius: 17px;
  box-shadow: 0 20px 44px rgba(8, 48, 70, .18), 0 3px 10px rgba(8, 48, 70, .06);
}

body:has(.public-topbar) .website-select__menu--locale .website-select__option {
  min-height: 50px;
  padding: 11px 14px;
  border-radius: 11px;
  color: #17394d;
  font-size: .9rem;
  font-weight: 650;
}

body:has(.public-topbar) .website-select__menu--locale .website-select__option[aria-selected="true"] {
  border-color: #b8dfeb;
  background: #e1f3f8;
  color: #123d53;
}

body:has(.public-topbar) .website-select__menu--locale .website-select__option[aria-selected="true"] b {
  color: #0787b2;
  font-size: 1rem;
}

/* Keep the new shared footer controls consistent with their own compact style. */
body:has(.public-topbar) .encore-footer {
  margin-top: clamp(48px, 7vw, 88px);
  border: 0;
  background: linear-gradient(115deg, #041f31, #062b40 64%, #07334a);
  color: #f5fbff;
}
body:has(.public-topbar) .encore-footer :is(.ef-disclosure, .ef-legal-link, .ef-dialog-close) {
  font-family: inherit;
  letter-spacing: normal;
  transition: none;
}
body:has(.public-topbar) .encore-footer .ef-disclosure {
  min-height: 50px;
  border-radius: 14px;
  transform: none;
}
body:has(.public-topbar) .encore-footer .ef-legal-link {
  min-height: 40px;
  border-radius: 10px;
  transform: none;
}
body:has(.public-topbar) .public-footer__primary-link img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
body:has(.public-topbar) .encore-footer .ef-dialog-close {
  min-height: 42px;
  border-radius: 50%;
  transform: none;
}
body:has(.public-topbar) .encore-footer .ef-heading {
  color: #bfe9f6;
  font-size: 1rem !important;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.3 !important;
}

/* Compact EN/ES sliding selector from the approved pill reference. */
body:has(.public-topbar) .locale-switcher { display: inline-flex; align-items: center; }
body:has(.public-topbar) .locale-toggle {
  position: relative;
  display: grid;
  width: 88px;
  height: 44px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  padding: 3px;
  overflow: hidden;
  border: 1px solid #d7e5eb;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(8, 40, 59, .08);
}
body:has(.public-topbar) .locale-toggle__thumb {
  position: absolute;
  z-index: 0;
  inset: 3px auto 3px 3px;
  width: calc((100% - 6px) / 2);
  border-radius: 999px;
  background: #123b50;
  box-shadow: 0 2px 6px rgba(8, 40, 59, .18);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
body:has(.public-topbar) .locale-toggle[data-current="es"] .locale-toggle__thumb { transform: translateX(100%); }
body:has(.public-topbar) .locale-toggle [data-locale-option] {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #466274;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .025em;
  cursor: pointer;
  transition: color .16s ease;
}
body:has(.public-topbar) .locale-toggle [data-locale-option][aria-checked="true"] { color: #fff; }
body:has(.public-topbar) .locale-toggle [data-locale-option]:focus-visible { outline: 2px solid #36a9d1; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  body:has(.public-topbar) .locale-toggle__thumb,
  body:has(.public-topbar) .locale-toggle [data-locale-option] { transition: none; }
}

/* Keep the current destination highlighted after the pointer leaves the menu. */
body:has(.public-topbar) .public-topbar .public-nav > a[aria-current="page"],
body:has(.public-topbar) .public-topbar .public-nav > .site-menu > .site-menu__button[aria-current="page"] {
  background: #e8f5fb;
  color: var(--website-blue);
  font-weight: 650;
}

body:has(.public-topbar) .public-topbar .site-menu__panel a[aria-current="page"],
body:has(.public-topbar) .mobile-navigation [data-nav-link][aria-current="page"] {
  background: #eef7fb;
  color: #0a668e;
}

/* Compact the open calendar without shrinking the date field in the planner. */
body:has(.public-topbar) .website-date-picker__popover {
  gap: 9px;
  padding: 12px;
  border-radius: 18px;
}

body:has(.public-topbar) .website-date-picker__popover .website-date-picker__header {
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 6px;
}

body:has(.public-topbar) .website-date-picker__popover .website-date-picker__header strong {
  font-size: .82rem;
}

body:has(.public-topbar) .website-date-picker__popover .website-date-picker__nav {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 10px;
  font-size: 1.2rem;
}

body:has(.public-topbar) .website-date-picker__popover .website-date-picker__weekdays,
body:has(.public-topbar) .website-date-picker__popover .website-date-picker__grid {
  gap: 3px;
}

body:has(.public-topbar) .website-date-picker__popover .website-date-picker__day {
  min-height: 38px;
  font-size: .72rem;
}

/* Preserve a visible title hierarchy after the legacy page sheets load. */
body:has(.public-topbar) :is(main h1, .site-page h1, .public-hero h1, .premium-hero h1) {
  font-weight: 760 !important;
}
body:has(.public-topbar) :is(main h2, .site-page h2, .public-hero h2, .premium-hero h2) {
  font-weight: 700 !important;
}
body:has(.public-topbar) :is(main h3, .site-page h3, .public-hero h3, .premium-hero h3) {
  font-weight: 650 !important;
}
body:has(.public-topbar) :is(.site-page__hero p, .site-page__section header p, .public-hero p, .public-section-head p) {
  font-weight: 400 !important;
}

/* Help page: blend the supplied support illustration into the full hero
   background while keeping the copy and topic links easy to read. */
body:has(.public-topbar) .site-page--help .help-intro {
  position: relative;
  isolation: isolate;
  background-color: #f2f9fc;
  background-image:
    linear-gradient(90deg, rgba(247, 251, 252, .98) 0%, rgba(247, 251, 252, .88) 38%, rgba(247, 251, 252, .48) 62%, rgba(247, 251, 252, .08) 100%),
    url("/assets/media/help-support-background.png");
  background-position: center, right center;
  background-size: cover, auto 100%;
  background-repeat: no-repeat;
}

@media (max-width: 700px) {
  body:has(.public-topbar) .site-page--help .help-intro {
    background-image:
      linear-gradient(90deg, rgba(247, 251, 252, .94), rgba(247, 251, 252, .58)),
      url("/assets/media/help-support-background.png");
    background-position: center, right bottom;
    background-size: cover, auto 72%;
  }
}

/* Trips hero uses the supplied route artwork as its full-bleed background. */
body:has(.public-topbar) .site-page--trips .trips-hero {
  background-color: #062b43;
  background-image:
    linear-gradient(90deg, rgba(3, 35, 54, .24) 0%, rgba(3, 35, 54, .12) 48%, rgba(3, 35, 54, .02) 100%),
    url("/assets/media/trips-hero-background.png");
  background-position: center, center 54%;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

@media (max-width: 700px) {
  body:has(.public-topbar) .site-page--trips .trips-hero {
    background-image:
      linear-gradient(90deg, rgba(3, 35, 54, .58), rgba(3, 35, 54, .18)),
      url("/assets/media/trips-hero-background.png");
    background-position: center, 66% center;
    background-size: cover, auto 100%;
  }
}
body:has(.public-topbar) .site-page--trips .trips-hero::after {
  display: none !important;
}

/* Contact hero: use the supplied customer-support artwork as the section
   background, fading it gently under the copy and keeping the marker in front. */
body:has(.public-topbar) .site-page--contact .contact-intro {
  position: relative;
  isolation: isolate;
  background-color: #062b50;
  background-image:
    linear-gradient(90deg, rgba(4, 34, 62, .68) 0%, rgba(4, 34, 62, .38) 42%, rgba(4, 34, 62, .08) 75%),
    url("/assets/media/contact-hero-background.png");
  background-position: center, center 54%;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

@media (max-width: 700px) {
  body:has(.public-topbar) .site-page--contact .contact-intro {
    background-image:
      linear-gradient(90deg, rgba(4, 34, 62, .72), rgba(4, 34, 62, .42)),
      url("/assets/media/contact-hero-background.png");
    background-position: center, right bottom;
    background-size: cover, auto 68%;
  }
}
body:has(.public-topbar) .site-page--contact .contact-intro__marker {
  background: rgba(4, 34, 62, .96);
  border-color: rgba(141, 221, 242, .72);
  box-shadow: 0 18px 40px rgba(0, 18, 34, .26);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Homepage FAQ options use horizontal separators without boxed side edges. */
body:has(.public-topbar) .public-faq-section .public-faq-list details {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

/* Blend the replacement route illustration into the planning section itself. */
body:has(.public-topbar) .site-page--routes .routes-planning-note {
  background-color: #eef8fb;
  background-image:
    linear-gradient(90deg, rgba(238, 248, 251, .98) 0%, rgba(238, 248, 251, .94) 35%, rgba(238, 248, 251, .62) 62%, rgba(238, 248, 251, .18) 100%),
    url("/assets/media/routes-planning-background.png");
  background-position: center, center 52%;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

body:has(.public-topbar) .site-page--routes .routes-planning-note__inner {
  display: block;
}

body:has(.public-topbar) .site-page--routes .routes-planning-note__inner > div {
  max-width: 760px;
}

@media (max-width: 700px) {
  body:has(.public-topbar) .site-page--routes .routes-planning-note {
    background-image:
      linear-gradient(90deg, rgba(238, 248, 251, .97), rgba(238, 248, 251, .76)),
      url("/assets/media/routes-planning-background.png");
    background-position: center, 78% center;
    background-size: cover, auto 100%;
  }
}

/* Final narrow-screen layout for the Trips planner. The section's editorial
   two-column rule is desktop-only; stack the introduction and form on phones
   and let each control use the full available width. */
@media (max-width: 900px) {
  body:has(.public-topbar) .site-page--trips .trip-search-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
    gap: clamp(24px, 5vw, 36px);
  }

  body:has(.public-topbar) .site-page--trips .trip-search-intro,
  body:has(.public-topbar) .site-page--trips .trip-search-card {
    width: 100%;
    max-width: none;
    min-width: 0;
    grid-column: 1 / -1;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .public-booking-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields,
  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields > *,
  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-detail-fields > * {
    min-width: 0;
    grid-column: 1 / -1;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-route-fields > .public-swap {
    justify-self: center;
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  body:has(.public-topbar) .site-page--trips .trips-hero__copy > p {
    max-width: 19rem;
    text-wrap: pretty;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-section {
    padding-block: 44px 52px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card {
    padding: 16px;
    border-radius: 24px;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card__header {
    align-items: flex-start;
  }

  body:has(.public-topbar) .site-page--trips .trip-search-card .booking-field,
  body:has(.public-topbar) .site-page--trips .trip-search-card .public-search-button {
    width: 100%;
    min-width: 0;
  }
}
