:root {
  --blue: #1a8adf;
  --blue-dark: #0b63b3;
  --navy: #0c2a4a;
  --orange: #ff8a00;
  --orange-dark: #e07800;
  --ink: #122033;
  --muted: #5b6b7c;
  --line: #e4ebf2;
  --sheet: #ffffff;
  --bg: #eef4fa;
  --shadow: 0 18px 50px rgba(12, 42, 74, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.65rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand img {
  height: 44px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 0.35rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
}

.nav-link.is-on {
  color: var(--blue-dark);
  background: #e8f3fc;
}

.env-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: #fff4e5;
  border: 1px solid #ffd9a8;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.session {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}

.ghost {
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.hero {
  position: relative;
  background:
    radial-gradient(900px 320px at 88% 10%, rgba(255, 138, 0, 0.22), transparent 55%),
    radial-gradient(700px 280px at 8% 120%, rgba(26, 138, 223, 0.35), transparent 50%),
    linear-gradient(160deg, #07243f 0%, #0e4f8c 52%, #1a8adf 100%);
  color: #fff;
  padding: 2.5rem 1.25rem 4.8rem;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 280px;
  height: 280px;
  border: 18px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 0.6rem;
  max-width: 36rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin-bottom: 0.5rem;
  max-width: 18ch;
}

.hero-lede {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: min(38rem, 100%);
  line-height: 1.45;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  list-style: none;
  margin-top: 1.15rem;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.9;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.25);
}

main {
  max-width: 1120px;
  width: 100%;
  margin: -3.4rem auto 0;
  padding: 0 1rem 3.5rem;
  position: relative;
  z-index: 2;
  min-width: 0;
}

.sheet,
.search-card,
.login-sheet {
  background: var(--sheet);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-sheet {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 1.7rem 1.55rem 1.45rem;
}

.login-logo {
  height: 48px;
  width: auto;
  margin-bottom: 0.9rem;
}

.login-sheet h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.lede {
  color: var(--muted);
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 0.8rem;
}

.search-card {
  padding: 1rem 1rem 1.05rem;
}

.trip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.trips {
  display: flex;
  background: #f3f7fb;
  border-radius: 999px;
  padding: 0.16rem;
}

.trip {
  border: 0;
  background: transparent;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}

.trip.is-on {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(12, 42, 74, 0.12);
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(140px, 1.25fr) 36px minmax(140px, 1.25fr) minmax(138px, 0.95fr) minmax(160px, 1.15fr) auto;
  align-items: stretch;
  background: #f6fafe;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: visible;
}

.search-card.is-return .search-bar {
  grid-template-columns: minmax(120px, 1.1fr) 36px minmax(120px, 1.1fr) minmax(128px, 0.85fr) minmax(128px, 0.85fr) minmax(150px, 1fr) auto;
}

[hidden] {
  display: none !important;
}

.field {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.85rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-right: 1px solid var(--line);
  min-width: 0;
  position: relative;
}

.field small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--blue-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-form label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  font-weight: 600;
  color: var(--ink);
  background: #f8fbfe;
}

.field input {
  border: 0;
  background: transparent;
  padding: 0.1rem 0 0;
  border-radius: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.field input[name='origin'],
.field input[name='destination'] {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.field input[type='date'] {
  font-size: 0.92rem;
  min-width: 0;
}

.login-form input:focus,
.field input:focus,
select:focus {
  outline: none;
}

.field:focus-within {
  background: #fff;
}

.login-form input:focus {
  outline: 2px solid rgba(26, 138, 223, 0.35);
  border-color: var(--blue);
  background: #fff;
}

.swap {
  width: 36px;
  height: 36px;
  align-self: center;
  margin: 0 -10px;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(12, 42, 74, 0.08);
}

.swap:hover {
  background: #e8f3fc;
}

.travelers-btn {
  border: 0;
  background: transparent;
  padding: 0.15rem 0 0;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.travelers-btn strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
}

.travelers {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 12;
  width: min(340px, 86vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid var(--line);
}

.stepper strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.stepper small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.step button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-dark);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.step button:hover {
  background: #e8f3fc;
}

.step input {
  width: 2.2rem;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  font-weight: 800;
  -moz-appearance: textfield;
}

.step input::-webkit-outer-spin-button,
.step input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cabin-row {
  padding-top: 0.85rem;
}

.cabin-row > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.cabins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.cabins label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

.cabins label:has(input:checked) {
  border-color: var(--blue);
  background: #e8f3fc;
  color: var(--blue-dark);
}

.cabins input {
  width: auto;
  accent-color: var(--blue);
}

.cta {
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 0.78rem 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 138, 0, 0.28);
}

.cta:hover {
  background: var(--orange-dark);
}

.cta:disabled {
  opacity: 0.7;
  cursor: wait;
}

.search-cta {
  white-space: nowrap;
  align-self: stretch;
  min-width: 7.6rem;
  margin: 0.35rem;
  border-radius: 12px;
  padding: 0 1.25rem;
  box-shadow: none;
  font-size: 1rem;
}

.banner {
  margin: 0.85rem 0 0;
}

.err {
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 700;
}

.results {
  margin-top: 1.15rem;
}

.empty,
.status-card {
  background: var(--sheet);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow);
  color: var(--muted);
}

.empty strong,
.status-card strong {
  display: block;
  color: var(--navy);
  font-size: 1.08rem;
  margin-bottom: 0.28rem;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #d7e6f4;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}

.spinner.sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skel-list {
  display: grid;
  gap: 0.7rem;
}

.skel {
  height: 96px;
  border-radius: 18px;
  background: linear-gradient(90deg, #e7eef6 20%, #f7fafc 50%, #e7eef6 80%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

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

.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.summary h2 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.summary .meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.sorts {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.14rem;
}

.sort {
  border: 0;
  background: transparent;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

.sort.is-on {
  background: var(--navy);
  color: #fff;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  margin-right: 0.35rem;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.still {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.fare {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem 0.95rem;
  margin-bottom: 0.7rem;
  box-shadow: 0 8px 24px rgba(12, 42, 74, 0.05);
}

.fare:hover {
  border-color: #c5daf0;
  box-shadow: 0 12px 28px rgba(12, 42, 74, 0.08);
}

.fare.is-open {
  border-color: var(--blue);
}

.carrier {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--navy);
  flex: 0 0 auto;
}

.badge.ba {
  background: #075aaa;
}
.badge.lh {
  background: #05164d;
}
.badge.lx {
  background: #e30613;
}
.badge.os {
  background: #c8102e;
}
.badge.sn {
  background: #0a1f44;
  color: #ffcc00;
}
.badge.az {
  background: #00643a;
}
.badge.ac {
  background: #e31837;
}
.badge.\34y,
.badge.discover {
  background: #ffcc00;
  color: #111;
}

.carrier-name {
  font-weight: 800;
  font-size: 0.95rem;
}

.flights {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.itinerary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.itinerary + .itinerary {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
}

.time {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.plus1 {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--orange-dark);
  margin-left: 0.15rem;
  vertical-align: super;
}

.iata {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.path {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.path-line {
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  border-radius: 99px;
  margin: 0.28rem 0.15rem 0.2rem;
  position: relative;
}

.path-line::before,
.path-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  transform: translateY(-50%);
}

.path-line::after {
  right: 0;
  background: var(--orange);
}

.buy {
  text-align: right;
  min-width: 148px;
}

.price {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.price-note {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0.08rem 0 0.55rem;
}

.select {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.52rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.select:hover {
  background: var(--blue-dark);
}

.details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
  padding-top: 0.75rem;
}

.leg {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.7rem;
  padding: 0.35rem 0;
  font-size: 0.88rem;
}

.leg-flight {
  font-weight: 800;
  color: var(--navy);
}

.leg-path {
  color: var(--ink);
  font-weight: 600;
}

.leg-note {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.foot {
  max-width: 1120px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  overflow-wrap: break-word;
}

@media (max-width: 980px) {
  .search-bar,
  .search-card.is-return .search-bar {
    grid-template-columns: 1fr 36px 1fr;
  }
  .date-field,
  .travelers-field,
  .search-cta {
    grid-column: 1 / -1;
  }
  .search-cta {
    margin: 0.45rem;
    border-radius: 12px;
    height: 48px;
  }
  .field,
  .travelers-field {
    border-right: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 1.7rem 1rem 3.8rem;
  }
  .hero-lede,
  .lede,
  .foot {
    max-width: 100%;
  }
  .session {
    display: none;
  }
  .search-bar,
  .search-card.is-return .search-bar {
    grid-template-columns: 1fr;
  }
  .swap {
    display: none;
  }
  .fare,
  .itinerary {
    grid-template-columns: 1fr;
  }
  .summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .buy {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    width: 100%;
  }
  .select {
    width: 100%;
    text-align: center;
  }
  .env-pill {
    display: none;
  }
  .account {
    gap: 0.5rem;
  }
}

/* Offer actions: Details toggle + Continue-on-airline handoff */
.buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  min-width: 176px;
}
.buy .details-toggle,
.buy .select {
  width: 100%;
  text-align: center;
}
.details-toggle {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.details-toggle:hover {
  border-color: var(--blue);
}
.select:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Clearer outbound / return direction headers */
.dir-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.15rem 0 0.4rem;
}
.dir-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--navy);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
}
.dir-route {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
}
.dir-date {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.dir-divider {
  border-top: 1px dashed var(--line);
  margin: 0.6rem 0;
}
