/* EMBERFARE Design Closure V1.2
   Canonical final presentation owner for shared deal cards and homepage
   search/filter/results composition. Loaded last on published HTML.
   No JS-injected CSS; decorative route motion is disabled by contract. */

/* --------------------------------------------------------------------------
   Shared deal-card system
   -------------------------------------------------------------------------- */
.deal-grid,
.static-listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.deal-card,
.static-listing-grid .deal-card,
.static-listing-grid .deal-card:nth-child(8n + 1) {
  position: relative;
  grid-column: auto;
  min-width: 0;
  min-height: 350px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 24px;
  background-color: var(--night);
  background-position: center;
  background-size: cover;
  color: var(--cream);
  box-shadow: 0 7px 20px rgba(12, 23, 48, .08);
  isolation: isolate;
  transform: none;
  text-decoration: none;
}

.deal-card::before,
.static-listing-grid .deal-card::before {
  content: none;
}

.deal-card::after,
.static-listing-grid .deal-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 13, 31, .03) 0%,
    rgba(5, 13, 31, .06) 34%,
    rgba(5, 13, 31, .27) 55%,
    rgba(5, 13, 31, .74) 75%,
    rgba(5, 13, 31, .96) 100%
  );
}

.deal-card .card-content {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 24px 27px 20px;
  color: var(--cream);
}

/* Top utilities: context left, exceptional status right, attribution centred. */
.deal-card .found-badge {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 21px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 43%;
  min-height: 30px;
  margin: 0;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid rgba(247, 240, 231, .28);
  border-radius: 999px;
  background: rgba(7, 18, 42, .48);
  color: rgba(247, 240, 231, .9);
  font: 700 9.5px/1 var(--ui);
  letter-spacing: .075em;
  text-transform: uppercase;
  text-shadow: none;
  backdrop-filter: blur(6px);
}

.deal-card .found-badge b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card .found-badge i {
  flex: 0 0 auto;
  color: var(--coral);
  font-style: normal;
}

.deal-card .deal-signals {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 21px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 42%;
  margin: 0;
}

.deal-card .deal-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(20, 29, 51, .08);
  border-radius: 999px;
  background: rgba(247, 240, 231, .94);
  color: var(--night);
  font: 700 8.5px/1 var(--ui);
  letter-spacing: .055em;
  text-transform: uppercase;
  box-shadow: none;
  text-shadow: none;
  backdrop-filter: none;
}

.deal-card .deal-signal.one-way,
.deal-card .deal-signal.one-way-signal,
.deal-card .deal-signal.error-fare,
.deal-card .deal-signal.error_fare,
.deal-card .deal-signal.fare-mistake {
  border-color: rgba(244, 99, 63, .56);
  background: rgba(244, 99, 63, .94);
  color: #fff;
}

.deal-card .photo-credit,
.deal-card .card-photo-credit {
  position: absolute;
  z-index: 3;
  top: 16px;
  bottom: auto;
  left: 50%;
  right: auto;
  width: auto;
  max-width: 30%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 240, 231, .5);
  font: 500 7.5px/1.2 var(--ui);
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: nowrap;
  opacity: .82;
  transform: translateX(-50%);
  backdrop-filter: none;
}

/* Lower-left information ladder: metadata -> trip/price -> route. */
.deal-card .meta {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  min-height: 18px;
  max-width: calc(100% - 135px);
  margin: 0 0 5px;
  color: rgba(247, 240, 231, .76);
  font: 600 11.5px/1.3 var(--ui);
  letter-spacing: 0;
  text-shadow: none;
}

.deal-card .meta span + span::before {
  content: "·";
  margin-right: 7px;
  color: rgba(247, 240, 231, .4);
}

.deal-card .price-row {
  order: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: calc(100% - 135px);
  margin: 0 0 3px;
}

.deal-card .fare-price {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.deal-card .trip-signal,
.deal-card .trip-label,
.deal-card .trip-type {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin: 0;
  color: rgba(247, 240, 231, .72);
  font: 700 9px/1 var(--ui);
  letter-spacing: .11em;
  text-transform: uppercase;
  text-shadow: none;
}

.deal-card .price,
.deal-card .fare-price > .price {
  display: block;
  margin: 0;
  color: var(--coral);
  font: 400 clamp(32px, 2.35vw, 38px)/.96 var(--display);
  letter-spacing: -.025em;
  text-shadow: none;
}

.deal-card .price-source-note {
  order: 3;
  max-width: calc(100% - 135px);
  margin: 0 0 4px;
  color: rgba(247, 240, 231, .56);
  font-size: 9px;
  text-shadow: none;
}

.deal-card .card-route-title,
.deal-card h3.card-route-title {
  order: 4;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 9px;
  max-width: 100%;
  margin: 0;
  padding: 0 138px 0 0;
  color: var(--cream);
  font: 400 clamp(32px, 2.55vw, 40px)/.96 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
  text-shadow: none;
}

.deal-card .card-route-title span { min-width: 0; }
.deal-card .card-route-title i {
  flex: 0 0 auto;
  color: var(--coral);
  font-style: normal;
  font-size: .55em;
  line-height: .8;
}

/* Lower-right utility stack, independent from the lower-left information ladder. */
.deal-card .card-foot {
  position: absolute;
  z-index: 4;
  right: 27px;
  bottom: 19px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 3px;
  width: 124px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: rgba(247, 240, 231, .7);
  font: 600 10px/1.2 var(--ui);
  letter-spacing: 0;
  text-align: right;
  text-shadow: none;
}

.deal-card .card-foot > span:first-child {
  order: 2;
  max-width: 124px;
  overflow: hidden;
  color: rgba(247, 240, 231, .7);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card .details-cta,
.deal-card .card-foot button {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--coral);
  font: 700 10.5px/1 var(--ui);
  letter-spacing: .01em;
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
  backdrop-filter: none;
}

.deal-card .details-cta:focus-visible,
.deal-card .card-foot button:focus-visible,
.deal-card:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.deal-card,
.deal-card * { text-shadow: none; }

@media (hover: hover) and (pointer: fine) {
  .deal-card { transition: transform .18s ease, box-shadow .18s ease; }
  .deal-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(12, 23, 48, .1);
  }
  .deal-card:hover .details-cta,
  .deal-card:hover .card-foot button { color: #ff7653; }
}

.static-listing-grid .deal-card:nth-child(8n + 1),
.static-listing-grid .deal-card:nth-child(8n + 1) .card-content { min-height: 350px; }

/* --------------------------------------------------------------------------
   Homepage route thread: visible in two-column gutters, hidden for one column.
   -------------------------------------------------------------------------- */
body:not(.static-deal-page) main > .deals-section > .deal-grid {
  position: relative;
  z-index: 2;
  isolation: isolate;
}

body:not(.static-deal-page) main > .deals-section > .deal-grid::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -8px -26px -10px;
  pointer-events: none;
  opacity: .74;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cpath d='M500 -20 C478 105 526 175 500 270 C474 365 526 435 500 535 C474 635 526 705 500 805 C486 862 497 925 500 1020' fill='none' stroke='%23df8f75' stroke-opacity='.72' stroke-width='1.5' stroke-linecap='round' stroke-dasharray='8 11'/%3E%3Ccircle cx='500' cy='270' r='5' fill='%23f7f0e7' stroke='%23f4633f' stroke-width='1.5'/%3E%3Ccircle cx='500' cy='535' r='4.5' fill='%23f7f0e7' stroke='%23efc3b2' stroke-width='1.5'/%3E%3Ccircle cx='500' cy='805' r='5' fill='%23f7f0e7' stroke='%23f4633f' stroke-width='1.5'/%3E%3C/svg%3E");
}

body:not(.static-deal-page) main > .deals-section > .deal-grid > .deal-card,
body:not(.static-deal-page) main > .deals-section > .deal-grid > .latest-deals-divider,
body:not(.static-deal-page) main > .deals-section > .deal-grid > #loadMoreWrap {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Search action route orbit
   -------------------------------------------------------------------------- */
.master-search button,
main > .hero .search-btn {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.master-search button::before,
main > .hero .search-btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 54px;
  border: 1px solid rgba(244, 99, 63, .66);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  pointer-events: none;
  box-shadow: 0 0 0 8px rgba(239, 195, 178, .13);
}

.master-search button::after,
main > .hero .search-btn::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 3px;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--coral);
  border-radius: 50%;
  background: var(--cream);
  pointer-events: none;
}

.master-search .search-icon,
main > .hero .search-btn .search-icon { position: relative; z-index: 3; }

.miles-page .page-route-atmosphere { display: none; }

/* --------------------------------------------------------------------------
   Homepage: duplicate heading stays collapsed; desktop geometry is anchored
   from the hero bottom so viewport width cannot create an empty floor.
   -------------------------------------------------------------------------- */
body#pageTop .master-stage > .design-route { display: none; }

body#pageTop .deals-section > .best-deals-heading {
  display: flex;
  height: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

@media (min-width: 1101px) {
  body#pageTop .master-stage {
    height: clamp(520px, 37vw, 620px);
    min-height: 0;
    max-height: none;
  }

  body#pageTop .master-clean-surface {
    top: 56%;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(247,240,231,0), rgba(247,240,231,.15) 24%, rgba(247,240,231,.72) 70%, var(--cream) 100%);
  }

  body#pageTop .date-route-overlay { height: 100%; }

  body#pageTop .master-search {
    top: auto;
    bottom: 112px;
    height: clamp(78px, 5.4vw, 90px);
  }

  body#pageTop .master-filters {
    position: absolute;
    z-index: 6;
    top: auto;
    bottom: 16px;
    left: 12%;
    width: 76%;
    height: 82px;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    line-height: 1;
  }

  body#pageTop .master-filter-row {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body#pageTop .master-filter-row:first-child { display: block; }
  body#pageTop .master-filter-row:first-child .master-filter-label { display: none; }
  body#pageTop .master-filter-row:first-child .master-filter-options {
    display: grid;
    grid-template-columns: .95fr .82fr .72fr 1.35fr 1.35fr 1.08fr .8fr .95fr;
    gap: clamp(6px, .6vw, 10px);
    min-width: 0;
    overflow: visible;
    padding: 0;
  }

  body#pageTop .master-filter-row:first-child .master-filter-options button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    padding: 0 clamp(8px, .7vw, 14px);
    border: 1px solid rgba(20, 29, 51, .14);
    border-radius: 999px;
    background: rgba(247, 240, 231, .9);
    color: rgba(20, 29, 51, .92);
    box-shadow: 0 5px 14px rgba(20, 29, 51, .035);
    backdrop-filter: none;
    font: 600 clamp(10.5px, .72vw, 12.5px)/1 var(--ui);
    letter-spacing: .065em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body#pageTop .master-filter-row:first-child .master-filter-options button::after { content: none; }
  body#pageTop .master-filter-row:first-child .master-filter-options button:hover {
    border-color: rgba(239, 195, 178, .82);
    background: rgba(255, 248, 242, .92);
  }
  body#pageTop .master-filter-row:first-child .master-filter-options button.is-active {
    border-color: rgba(239, 195, 178, .94);
    background: rgba(255, 248, 242, .96);
    color: var(--coral);
    font-weight: 650;
  }
  body#pageTop .master-filter-row:first-child .master-filter-options button.is-active::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--coral);
  }

  body#pageTop .master-filter-row + .master-filter-row {
    position: absolute;
    top: 46px;
    left: 0;
    right: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-width: 0;
  }

  body#pageTop .master-filter-row + .master-filter-row .master-filter-label {
    display: block;
    color: rgba(20, 29, 51, .55);
    font: 700 8.5px/1 var(--ui);
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body#pageTop .master-filter-row + .master-filter-row .master-fare-options { display: none; }
  body#pageTop .master-fare-select {
    display: block;
    min-width: 176px;
    max-width: 176px;
  }
  body#pageTop .master-fare-select .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  body#pageTop .master-fare-select select {
    height: 36px;
    padding: 0 38px 0 14px;
    border-color: rgba(20, 29, 51, .13);
    background: rgba(247, 240, 231, .8);
    box-shadow: 0 5px 14px rgba(20, 29, 51, .035);
  }
  body#pageTop .master-fare-select select:hover {
    border-color: rgba(244, 99, 63, .34);
    background: rgba(255, 248, 242, .92);
  }

  body#pageTop .deals-section {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: clamp(22px, 2vw, 32px);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
}

/* --------------------------------------------------------------------------
   Tablet / phone. Their structural hero/filter implementation lives in the
   responsive layers; closure owns the spacing contract and shared card system.
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .deal-grid,
  .static-listing-grid { gap: 18px; }

  .deal-card,
  .static-listing-grid .deal-card,
  .static-listing-grid .deal-card:nth-child(8n + 1) { min-height: 360px; }

  .deal-card .card-content { padding: 22px 22px 18px; }
  .deal-card .meta,
  .deal-card .price-row,
  .deal-card .price-source-note { max-width: calc(100% - 118px); }
  .deal-card .card-route-title,
  .deal-card h3.card-route-title {
    padding-right: 120px;
    font-size: clamp(29px, 3.5vw, 36px);
  }
  .deal-card .price,
  .deal-card .fare-price > .price { font-size: clamp(31px, 3.2vw, 36px); }
  .deal-card .card-foot { right: 22px; bottom: 17px; width: 108px; }
  .deal-card .card-foot > span:first-child { max-width: 108px; font-size: 9.5px; }

  body#pageTop main > .deals-section > .home-mobile-filter-ledger { margin-bottom: 16px; }

  .master-search button::before,
  main > .hero .search-btn::before { width: 74px; height: 50px; }
}

/* Two-column tablet cards do not have enough reliable centre rail for credit. */
@media (min-width: 761px) and (max-width: 1100px) {
  .deal-card .photo-credit,
  .deal-card .card-photo-credit {
    top: 53px;
    max-width: 72%;
    color: rgba(247, 240, 231, .48);
  }
}

@media (max-width: 900px) {
  body#pageTop .destinations {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(26px, 5vw, 40px);
  }
}

@media (max-width: 760px) {
  .deal-grid,
  .static-listing-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .deal-card,
  .static-listing-grid .deal-card,
  .static-listing-grid .deal-card:nth-child(8n + 1) {
    min-height: 360px;
    border-radius: 22px;
  }

  .deal-card .card-content { padding: 20px 20px 17px; }
  .deal-card .found-badge { top: 16px; left: 17px; max-width: 46%; min-height: 28px; padding-inline: 9px; font-size: 9px; }
  .deal-card .deal-signals { top: 16px; right: 17px; max-width: 42%; }
  .deal-card .deal-signal { min-height: 28px; padding-inline: 9px; font-size: 8px; }

  .deal-card .photo-credit,
  .deal-card .card-photo-credit {
    top: 52px;
    left: 50%;
    right: auto;
    bottom: auto;
    max-width: 74%;
    color: rgba(247, 240, 231, .5);
    font-size: 7px;
    text-align: center;
    transform: translateX(-50%);
  }

  .deal-card .meta { max-width: calc(100% - 108px); font-size: 11px; }
  .deal-card .price-row,
  .deal-card .price-source-note { max-width: calc(100% - 108px); }
  .deal-card .price,
  .deal-card .fare-price > .price { font-size: 34px; }
  .deal-card .card-route-title,
  .deal-card h3.card-route-title {
    padding-right: 108px;
    font-size: clamp(30px, 9vw, 36px);
  }
  .deal-card .card-foot { right: 20px; bottom: 16px; width: 96px; }
  .deal-card .card-foot > span:first-child { max-width: 96px; font-size: 9px; }
  .deal-card .details-cta,
  .deal-card .card-foot button { min-height: 44px; font-size: 10px; }

  body:not(.static-deal-page) main > .deals-section > .deal-grid::before { display: none; }
  body#pageTop main > .deals-section > .home-mobile-filter-ledger { margin-bottom: 12px; }
}

@media (max-width: 650px) {
  main > .hero .search-btn { padding-left: 51px; }
  main > .hero .search-btn::before {
    z-index: 1;
    left: 27px;
    top: 50%;
    width: 40px;
    height: 30px;
    border-color: rgba(255, 213, 200, .82);
    box-shadow: none;
    transform: translate(-50%, -50%) rotate(-13deg);
  }
  main > .hero .search-btn::after {
    left: 7px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-color: rgba(255, 255, 255, .9);
    background: var(--coral);
  }
}

@media (max-width: 380px) {
  .deal-card,
  .static-listing-grid .deal-card,
  .static-listing-grid .deal-card:nth-child(8n + 1) { min-height: 360px; }
  .deal-card .card-content { padding-inline: 17px; }
  .deal-card .meta { max-width: calc(100% - 92px); font-size: 10.5px; }
  .deal-card .price-row,
  .deal-card .price-source-note { max-width: calc(100% - 92px); }
  .deal-card .card-route-title,
  .deal-card h3.card-route-title { padding-right: 92px; font-size: 30px; }
  .deal-card .card-foot { right: 17px; width: 86px; }
  .deal-card .card-foot > span:first-child { max-width: 86px; font-size: 8.5px; }
  .deal-card .details-cta,
  .deal-card .card-foot button { font-size: 9.5px; }
}

@media (max-width: 340px) {
  .deal-card,
  .static-listing-grid .deal-card,
  .static-listing-grid .deal-card:nth-child(8n + 1) { min-height: 380px; }
  .deal-card .card-route-title,
  .deal-card h3.card-route-title { padding-right: 84px; font-size: 28px; }
  .deal-card .meta,
  .deal-card .price-row,
  .deal-card .price-source-note { max-width: calc(100% - 84px); }
  .deal-card .card-foot { right: 15px; width: 78px; }
  .deal-card .card-foot > span:first-child { max-width: 78px; }
}

/* --------------------------------------------------------------------------
   Destination Inspiration
   -------------------------------------------------------------------------- */
body#pageTop .destinations {
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(42px, 6vw, 84px);
}

body#pageTop .destination-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(20, 29, 51, .08);
  border-radius: 22px;
  background: rgba(255, 252, 248, .48);
  box-shadow: none;
}

body#pageTop .destination-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 15px 17px;
  border: 1px solid rgba(20, 29, 51, .09);
  border-radius: 15px;
  background: rgba(255, 253, 249, .72);
  color: var(--ink);
  text-decoration: none;
  box-shadow: none;
}

body#pageTop .destination-list a:last-child { grid-column: 1 / -1; }
body#pageTop .destination-list a span {
  min-width: 0;
  color: var(--ink);
  font: 400 clamp(25px, 2vw, 32px)/1 var(--display);
}
body#pageTop .destination-list a b {
  width: 24px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  white-space: nowrap;
}
body#pageTop .destination-list a b::after {
  content: "→";
  display: block;
  color: var(--coral);
  font: 400 21px/1 var(--ui);
}
body#pageTop .destination-list a:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

@media (max-width: 900px) {
  body#pageTop .destinations { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body#pageTop .destination-list { grid-template-columns: minmax(0, 1fr); }
  body#pageTop .destination-list a:last-child { grid-column: auto; }
}

/* --------------------------------------------------------------------------
   Narrow legacy-precedence bridge.

   styles.css still contains the 2026-08-27 product repair with !important on
   three homepage section properties and five shared card paint/color values.
   The declarations below mirror only values that are invariant inside their
   component/breakpoint. They must not be expanded to arbitrary geometry.
   Remove this bridge when that historical block is retired from styles.css.
   -------------------------------------------------------------------------- */
.deal-card::after,
.static-listing-grid .deal-card::after {
  background: linear-gradient(
    180deg,
    rgba(5, 13, 31, .03) 0%,
    rgba(5, 13, 31, .06) 34%,
    rgba(5, 13, 31, .27) 55%,
    rgba(5, 13, 31, .74) 75%,
    rgba(5, 13, 31, .96) 100%
  ) !important;
}
.deal-card .card-content { color: var(--cream) !important; }
.deal-card .price,
.deal-card .fare-price > .price { color: var(--coral) !important; }
.deal-card .card-route-title,
.deal-card h3.card-route-title { color: var(--cream) !important; }
.deal-card .meta { color: rgba(247, 240, 231, .76) !important; }
.deal-card .card-foot { color: rgba(247, 240, 231, .7) !important; }
body#pageTop .deals-section > .best-deals-heading { margin: 0 !important; }

@media (min-width: 901px) and (max-width: 1100px) {
  body#pageTop main > .deals-section {
    margin-top: -88px !important;
    padding-top: 0 !important;
    background: transparent !important;
  }
}

@media (min-width: 1101px) {
  body#pageTop .deals-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: transparent !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deal-card { transition: none; }
}

/* Compact desktop credit clearance.
   At the narrow desktop edge the centred attribution still shares the badge
   rail with the route/context badge. Keep it centred but move it below the
   badge rail through 1160px; wider cards return to the canonical top rail. */
@media (min-width: 1101px) and (max-width: 1160px) {
  .deal-card .photo-credit,
  .deal-card .card-photo-credit {
    top: 53px;
  }
}

/* Narrow-phone card height floor.
   The <=380px compact rule intentionally uses 360px, but <=340px needs
   additional vertical room for the stacked card controls and metadata. */
@media (max-width: 340px) {
  body#pageTop .deal-card {
    min-height: 380px;
  }
}


/* ==========================================================================
   V1.3 design delta (2026-09-26): single homepage hero + filters above results.
   One hero DOM serves every viewport: brand bar, promise, Phoenix artwork and
   the search pill with its route orbit. Region / Fare type / Fare Alerts sit
   in one compact bar directly above the deal grid (12–20 px handoff).
   The legacy .master-stage, main > .hero and body > .topbar homepage markup
   was removed, so their rules in older stylesheets no longer match.
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body#pageTop .ef-hero {
  /* Same content edge as the deal grid: 6vw gutters, 1238px max content width. */
  --ef-hero-pad: max(6vw, calc((100% - 1238px) / 2));
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: clamp(470px, 35vw, 590px);
  padding: 0 var(--ef-hero-pad) clamp(30px, 3vw, 44px);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.2;
}

body#pageTop .ef-hero__art {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247,240,231,0) 60%, rgba(247,240,231,.7) 86%, var(--cream) 100%),
    url("/assets/feniks-hero-approved.png") right top / cover no-repeat;
  pointer-events: none;
}

body#pageTop .ef-hero__bar {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  min-height: 72px;
  padding-top: env(safe-area-inset-top);
}

body#pageTop .ef-hero__brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font: 400 24px/1 var(--display);
  letter-spacing: .055em;
  text-decoration: none;
}

body#pageTop .ef-hero__brand .brand-phoenix { display: block; width: 36px; height: 40px; object-fit: contain; }

body#pageTop .ef-hero__nav { display: flex; align-items: center; gap: 8px; min-width: 0; }

body#pageTop .ef-hero__nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(20,29,51,.10);
  border-radius: 999px;
  background: rgba(247,240,231,.82);
  color: var(--ink);
  font: 600 10px/1 var(--ui);
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(20,29,51,.055);
}

body#pageTop .ef-hero__nav a:hover { border-color: rgba(239,195,178,.72); background: rgba(255,250,246,.94); color: var(--coral); }
body#pageTop .ef-hero__nav a.active,
body#pageTop .ef-hero__nav a[aria-current="page"] { border-color: rgba(244,99,63,.24); background: rgba(255,250,246,.96); color: var(--coral); }
body#pageTop .ef-hero__nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

body#pageTop .ef-hero__currency { display: block; position: relative; margin-left: auto; z-index: 20; }
/* 2026-10-01: the language picker is the same pill as the currency picker
   (it rendered as faint text next to it). */
body#pageTop .ef-hero__language { display: block; position: relative; margin-left: 8px; z-index: 20; }
body#pageTop .ef-hero__language .currency-select__trigger,
body#pageTop .ef-hero__currency .currency-select__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  /* styles.css ships a global transparent !important trigger for the old dark topbar. */
  border: 1px solid rgba(20,29,51,.12) !important;
  border-radius: 999px !important;
  background: rgba(255,250,246,.94) !important;
  color: var(--ink);
  font: 600 11px/1 var(--ui);
  letter-spacing: .04em;
  box-shadow: 0 5px 16px rgba(20,29,51,.08) !important;
}

body#pageTop .ef-hero__copy { max-width: min(640px, 50%); margin-top: clamp(24px, 3.6vw, 60px); }

body#pageTop .ef-hero h1 {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(50px, 4.85vw, 82px)/.9 var(--display);
  letter-spacing: -.035em;
}

body#pageTop .ef-hero h1 em { color: var(--coral); font-style: italic; }

body#pageTop .ef-hero__lede {
  max-width: 34em;
  margin: 18px 0 0;
  color: rgba(20,29,51,.78);
  font: 500 clamp(14px, 1.05vw, 17px)/1.55 var(--ui);
}

/* Search pill + compact route orbit around the action (locked motif, V1.2 §3). */
body#pageTop .ef-search {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  width: min(100%, 1080px);
  min-height: clamp(74px, 5.4vw, 88px);
  margin-top: clamp(26px, 3.2vw, 48px);
  padding: 8px 10px 8px clamp(10px, 1.6vw, 24px);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 999px;
  background: rgba(247,240,231,.97);
  box-shadow: 0 12px 28px rgba(20,29,51,.11);
}

body#pageTop .ef-search__field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 4px clamp(12px, 2vw, 30px);
  border-right: 1px solid rgba(20,29,51,.11);
}

body#pageTop .ef-search__field:nth-of-type(3) { border-right: 0; }

body#pageTop .ef-search__field > span {
  padding-left: 24px;
  color: var(--ink);
  font: 600 clamp(9px, .66vw, 11px)/1 var(--ui);
  letter-spacing: .11em;
  text-transform: uppercase;
}

body#pageTop .ef-search__field > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
body#pageTop .ef-search__field i { flex: 0 0 13px; font-style: normal; font-size: 14px; line-height: 1; text-align: center; }

body#pageTop .ef-search select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 600 clamp(14px, 1vw, 17px)/1.2 var(--ui);
  cursor: pointer;
}

body#pageTop .ef-search__go {
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: clamp(54px, 4.4vw, 66px);
  aspect-ratio: 1;
  margin: 0 clamp(12px, 1.6vw, 24px);
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(244,99,63,.72), 0 0 0 6px rgba(255,213,200,.55), 0 10px 24px rgba(244,99,63,.26);
}

body#pageTop .ef-search__go::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 150%;
  height: 100%;
  border: 1px solid rgba(244,99,63,.66);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  box-shadow: 0 0 0 8px rgba(239,195,178,.13);
  pointer-events: none;
}

body#pageTop .ef-search__go::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 4%;
  top: 10%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--coral);
  border-radius: 50%;
  background: var(--cream);
  pointer-events: none;
}

body#pageTop .ef-search .search-icon {
  position: relative;
  z-index: 3;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

body#pageTop .ef-search__go-label { display: none; }
body#pageTop .ef-search select:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 6px; }
body#pageTop .ef-search__go:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 5px var(--ink); }

/* Results area: no legacy hero overlap / Phoenix repaint behind main. */
body#pageTop main#top { background-image: none !important; }
body#pageTop main#top > .deals-section { margin-top: 0 !important; padding-top: 0 !important; }

/* Filter bar directly above the grid. */
body#pageTop .ef-filters {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin: 0 0 16px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(20,29,51,.08);
  border-radius: 22px;
  background: rgba(255,250,245,.9);
  box-shadow: 0 8px 24px rgba(20,29,51,.05);
}

body#pageTop .ef-filters__group { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Row 1: departure regions. Row 2: Fare type + Fare Alerts. Same on desktop and tablet. */
body#pageTop .ef-filters__group--region { flex: 1 1 100%; }

body#pageTop .ef-filters__label {
  flex: 0 0 auto;
  color: var(--coral);
  font: 600 9.5px/1 var(--ui);
  letter-spacing: .14em;
  text-transform: uppercase;
}

body#pageTop .ef-filters__chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

body#pageTop .ef-filters__chips::-webkit-scrollbar { display: none; }

body#pageTop .ef-filters .chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(20,29,51,.10);
  border-radius: 999px;
  background: rgba(255,253,249,.82);
  color: var(--ink);
  font: 600 11px/1 var(--ui);
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}

body#pageTop .ef-filters .chip:hover { border-color: rgba(244,99,63,.34); }
body#pageTop .ef-filters .chip.active { border-color: var(--night); background: var(--night); color: #fff; }
body#pageTop .ef-filters .chip:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

body#pageTop .ef-filters__select { position: relative; display: block; margin: 0; }
body#pageTop .ef-filters__select::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--coral);
  border-bottom: 1.5px solid var(--coral);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

body#pageTop .ef-filters__select select {
  appearance: none;
  -webkit-appearance: none;
  /* Approved desktop route selector geometry: 176 x 36 (V1.2 filter handoff). */
  width: 176px;
  height: 36px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(20,29,51,.12);
  border-radius: 999px;
  background: rgba(255,253,249,.82);
  color: var(--ink);
  font: 600 12px/1 var(--ui);
  cursor: pointer;
}

body#pageTop .ef-filters__select select:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
body#pageTop .ef-filters__select--region { display: none; }
body#pageTop .ef-filters__fare-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
body#pageTop .ef-filters__fare-links a { color: var(--ink); font: 600 11px/1 var(--ui); text-decoration: none; }
body#pageTop .ef-filters__fare-links a[aria-current="page"] { color: var(--coral); }
/* navigation.js marks the document once the Fare type select is bound. */
.route-selects-ready body#pageTop .ef-filters__fare-links { display: none; }
html:not(.route-selects-ready) body#pageTop .ef-filters__select--fare { display: none; }
body#pageTop .ef-filters__alert { margin-left: auto; }
body#pageTop .ef-filters__alert:empty { display: none; }
body#pageTop .home-fare-alert--bar { display: block; }

/* Tablet: same hero, narrower text column; chips keep one scrollable row. */
@media (max-width: 1100px) {
  body#pageTop .ef-hero { --ef-hero-pad: max(clamp(24px, 5vw, 56px), env(safe-area-inset-left)); min-height: 0; }
  /* 2026-09-30: the phoenix head sits at the top of the artwork; start the
     art below the 72px brand bar so the nav pills never cover the head. */
  body#pageTop .ef-hero__art {
    background:
      linear-gradient(90deg, rgba(247,240,231,.92) 0%, rgba(247,240,231,.55) 38%, rgba(247,240,231,0) 64%),
      linear-gradient(180deg, var(--cream) 0, var(--cream) 60px, rgba(247,240,231,0) 110px, rgba(247,240,231,0) 58%, rgba(247,240,231,.72) 84%, var(--cream) 100%),
      url("/assets/feniks-hero-approved.png") 70% 64px / cover no-repeat;
  }
  body#pageTop .ef-hero__copy { max-width: min(560px, 62%); margin-top: clamp(28px, 5vw, 48px); }
  body#pageTop .ef-hero h1 { font-size: clamp(52px, 7.4vw, 78px); }
  body#pageTop .ef-search { width: 100%; margin-top: 32px; }
  body#pageTop .home-fare-alert--bar .home-fare-alert__form { width: 100%; }
  /* Touch-first widths: every filter control is a >=44px target. */
  body#pageTop .ef-filters .chip,
  body#pageTop .home-fare-alert--bar .home-fare-alert__trigger { min-height: 44px; }
  body#pageTop .ef-filters__select select { height: 44px; }
}

/* Narrow tablet: eight region chips no longer fit one row, so the region
   becomes a select beside Fare type instead of a hidden scroll strip. */
@media (min-width: 651px) and (max-width: 960px) {
  body#pageTop .ef-filters__group--region { flex: 0 1 auto; }
  body#pageTop .ef-filters__chips { display: none; }
  body#pageTop .ef-filters__select--region { display: block; }
}

/* Phone: two-row brand bar, 2x2 search card, stacked selects. */
@media (max-width: 650px) {
  body#pageTop .ef-hero { --ef-hero-pad: max(14px, env(safe-area-inset-left)); padding-bottom: 22px; }
  body#pageTop .ef-hero__art {
    background:
      linear-gradient(90deg, rgba(247,240,231,.94) 0%, rgba(247,240,231,.7) 46%, rgba(247,240,231,.08) 82%),
      linear-gradient(180deg, var(--cream) 0, var(--cream) 106px, rgba(247,240,231,0) 196px, rgba(247,240,231,0) 222px, rgba(247,240,231,.9) 290px, var(--cream) 340px),
      url("/assets/feniks-hero-approved.png") 26% 100px / auto 380px no-repeat;
  }
  body#pageTop .ef-hero__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 60px 46px;
    gap: 0;
    min-height: 0;
  }
  body#pageTop .ef-hero__brand { grid-row: 1; font-size: 23px; }
  body#pageTop .ef-hero__brand .brand-phoenix { width: 34px; height: 39px; }
  body#pageTop .ef-hero__currency { grid-row: 1; grid-column: 2; }
  body#pageTop .ef-hero__language { grid-row: 1; grid-column: 3; margin-left: 6px; }
  body#pageTop .ef-hero__nav {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body#pageTop .ef-hero__nav::-webkit-scrollbar { display: none; }
  body#pageTop .ef-hero__nav a { min-height: 34px; padding: 0 11px; font-size: 9.5px; }
  body#pageTop .ef-hero__copy { max-width: 100%; margin-top: 22px; }
  body#pageTop .ef-hero h1 { font-size: clamp(44px, 13.4vw, 58px); }
  body#pageTop .ef-hero__lede { max-width: 30em; margin-top: 14px; font-size: 15px; }

  body#pageTop .ef-search {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-height: 0;
    margin-top: 26px;
    padding: 8px;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(20,29,51,.12);
  }
  body#pageTop .ef-search__field {
    gap: 6px;
    min-height: 58px;
    padding: 8px 12px;
    border: 1px solid rgba(20,29,51,.08);
    border-radius: 14px;
    background: rgba(255,253,249,.8);
  }
  body#pageTop .ef-search__field:nth-of-type(3) { border: 1px solid rgba(20,29,51,.08); }
  body#pageTop .ef-search__field > span { padding-left: 22px; font-size: 9px; }
  body#pageTop .ef-search select { font-size: 16px; }
  body#pageTop .ef-search__go {
    width: auto;
    min-height: 58px;
    aspect-ratio: auto;
    margin: 0;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px 0 20px;
    border-radius: 14px;
    font: 700 11px/1.15 var(--ui);
    letter-spacing: .08em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(244,99,63,.24);
  }
  /* Orbit stays around the magnifier: icon starts at 20px, so its centre is 29px. */
  body#pageTop .ef-search__go::before { left: 29px; width: 40px; height: 28px; box-shadow: none; border-color: rgba(255,255,255,.72); }
  body#pageTop .ef-search__go::after { left: 8px; top: calc(50% - 16px); border-color: #fff; background: var(--coral); }
  body#pageTop .ef-search .search-icon { width: 18px; height: 18px; }
  body#pageTop .ef-search__go-label { display: inline; }

  body#pageTop .ef-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
  }
  body#pageTop .ef-filters__group { flex-direction: column; align-items: stretch; gap: 6px; }
  body#pageTop .ef-filters__label { padding-left: 4px; }
  body#pageTop .ef-filters__chips { display: none; }
  body#pageTop .ef-filters__select--region { display: block; }
  body#pageTop .ef-filters__select select { width: 100%; min-width: 0; height: 48px; border-radius: 14px; font-size: 16px; }
  body#pageTop .ef-filters__select--region select { width: 100%; }
  body#pageTop .ef-filters__alert { grid-column: 1 / -1; margin: 0; }
  body#pageTop .home-fare-alert--bar .home-fare-alert__trigger { width: 100%; min-height: 44px; justify-content: space-between; }
  body#pageTop .home-fare-alert--bar .home-fare-alert__action { margin-left: auto; }
  body#pageTop .home-fare-alert--bar .home-fare-alert__form { grid-template-columns: 1fr; gap: 7px; padding: 7px; border-radius: 16px; }
  body#pageTop .home-fare-alert--bar .home-fare-alert__form input,
  body#pageTop .home-fare-alert--bar .home-fare-alert__form button { min-height: 44px; font-size: 16px; }
}

/* Very narrow phones: one search field per row so values are never clipped. */
@media (max-width: 380px) {
  body#pageTop .ef-search { grid-template-columns: 1fr; }
  body#pageTop .ef-search__go { min-height: 52px; }
  body#pageTop .ef-filters { grid-template-columns: 1fr; }
}
