:root {
  --brand-primary: #8b1ac4;
  --brand-primary-hover: #7415a3;
  --brand-primary-active: #64128c;
  --nav-bg: #222222;
  --page-bg: #eeeeee;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --text: #444444;
  --text-strong: #222222;
  --text-muted: #777777;
  --text-faint: #999999;
  --border: #d8d8d8;
  --border-soft: rgba(34, 34, 34, 0.09);
  --footer-bg: #364956;
  --danger: #b83b3b;
  --success: #32765f;
  --focus: rgba(139, 26, 196, 0.32);
  --shadow-soft: 0 1px 4px rgba(34, 34, 34, 0.1);
  --shadow-panel: 0 10px 28px rgba(34, 34, 34, 0.08);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1152px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

a:hover {
  color: var(--brand-primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.35;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.55rem, 3.8vw, 2.35rem);
  margin-bottom: 10px;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

p {
  margin-bottom: 18px;
}

.container,
.site-main {
  width: min(var(--container), 96%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--nav-bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: #ffffff;
  font-size: clamp(1.1rem, 2.7vw, 1.75rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand:hover {
  color: #ffffff;
}

.brand-logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-dot {
  color: #e8c6f7;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #444444;
  border-radius: var(--radius);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.site-nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 27px 18px;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.35;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #ffffff;
  color: var(--brand-primary);
}

.site-main {
  padding: 45px 0 58px;
}

.hero {
  display: grid;
  max-width: 100%;
  padding: 0 0 28px;
}

.hero-title {
  max-width: 100%;
  color: var(--text-strong);
  font-size: clamp(1.05rem, 2.15vw, 1.48rem);
  font-weight: 750;
  line-height: 1.22;
  margin-bottom: 0;
  overflow-wrap: break-word;
  white-space: normal;
}

.hero h1 em {
  color: var(--brand-primary);
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  background: rgba(33, 72, 243, 0.16);
  bottom: 0.02em;
  content: "";
  height: 0.32em;
  left: -0.03em;
  position: absolute;
  right: -0.04em;
  z-index: -1;
}

.hero-copy,
.summary-copy,
.destination-meta,
.card-source,
.backend-list,
.leg-muted {
  color: var(--text-muted);
}

.hero-copy {
  max-width: 640px;
  font-size: 1.06rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-shell,
.loading-state,
.empty-state,
.error-state {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}

.search-shell {
  padding: clamp(16px, 2.4vw, 28px);
}

.primary-fields,
.destination-fields,
.date-fields,
.advanced-grid,
.backend-grid,
.conditional-options {
  display: grid;
  gap: 14px;
}

.primary-fields {
  align-items: stretch;
  grid-template-columns: minmax(220px, 1.05fr) repeat(2, minmax(230px, 1fr));
  position: relative;
}

.booking-bar {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  gap: 14px;
  padding: 13px;
}

.booking-bar .field,
.booking-bar .date-range-field {
  min-width: 0;
  min-height: 78px;
  background: transparent;
  border-radius: var(--radius);
  padding: 0;
}

.field {
  min-width: 0;
}

.field span,
.switch span,
.range-title {
  display: block;
  margin: 0 0 8px 1px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.range-title {
  color: var(--text);
}

.booking-bar .location-field > span {
  color: var(--text);
}

.range-title small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:hover,
select:hover {
  border-color: #c5c5c5;
}

input:focus,
select:focus {
  border-color: var(--brand-primary);
  outline: 3px solid var(--focus);
}

.booking-bar select,
.booking-bar .origin-dropdown summary {
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.booking-bar select:focus,
.booking-bar .origin-dropdown[open] summary {
  border-color: var(--brand-primary);
  outline: 3px solid var(--focus);
}

.origin-control {
  position: relative;
}

.origin-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.origin-dropdown summary::-webkit-details-marker,
.advanced summary::-webkit-details-marker,
.backend-stuff summary::-webkit-details-marker,
.options-details summary::-webkit-details-marker {
  display: none;
}

#origin-summary {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.origin-tag,
.origin-placeholder {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.origin-tag {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand-primary);
  overflow-wrap: anywhere;
}

.origin-placeholder {
  color: var(--text-muted);
}

.origin-dropdown summary b {
  flex: 0 0 auto;
  color: var(--brand-primary);
  font-size: 0.8rem;
}

.origin-dropdown[open] summary {
  border-color: var(--brand-primary);
}

.origin-options {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-panel);
}

.origin-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}

.origin-options label:hover {
  background: var(--surface-soft);
}

.origin-options input {
  width: auto;
  min-height: auto;
  padding: 0;
  accent-color: var(--brand-primary);
}

.location-field input {
  font-weight: 700;
}

.date-range-field {
  position: relative;
  min-width: 0;
}

.date-range-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.date-range-inputs label {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.date-range-inputs label span {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-range-inputs input {
  min-height: 32px;
  padding: 4px 6px;
  font-size: 0.86rem;
  font-weight: 750;
}

.date-range-inputs input[aria-expanded="true"] {
  border-color: var(--brand-primary);
}

.range-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  max-width: calc(100vw - 24px);
  max-height: min(76vh, 560px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-panel);
}

.range-popover-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.range-popover-header strong {
  color: var(--text);
  font-size: 0.95rem;
  text-align: center;
}

.range-popover-header button,
.range-day {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.range-popover-header button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--brand-primary);
  font-weight: 800;
}

.range-popover-header button:hover {
  background: #efefef;
}

.range-calendar-panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.range-calendar-pane h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: center;
}

.range-weekdays,
.range-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.range-weekdays {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.range-calendar-grid {
  gap: 3px;
}

.range-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.range-day:hover {
  background: var(--surface-soft);
}

.range-day.range_middle,
.range-day.range_preview {
  background: rgba(139, 26, 196, 0.14);
  color: var(--brand-primary-active);
}

.range-day.range_start,
.range-day.range_end,
.range-day.range_hover {
  background: var(--brand-primary);
  color: #ffffff;
}

.range-day.is-disabled {
  color: #b9b9b9;
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.range-day.is-empty {
  pointer-events: none;
}

.advanced,
.backend-stuff {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.advanced summary,
.backend-stuff summary,
.options-details > summary {
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  list-style: none;
}

.advanced summary span {
  color: var(--brand-primary);
  font-size: 1.1rem;
  padding-left: 4px;
}

.destination-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 22px;
}

.destination-heading .eyebrow,
.destination-heading p {
  margin-bottom: 0;
}

.destination-heading p:last-child {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.destination-heading code {
  color: var(--brand-primary);
}

.country-selector {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: #ffffff;
}

.country-selector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.country-selector h2 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

.country-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.country-selection-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.country-selection-actions p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.country-clear-button {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.country-clear-button:hover {
  border-color: var(--brand-primary);
  background: rgba(139, 26, 196, 0.07);
}

.country-clear-button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
  opacity: 0.65;
}

.country-limit-message {
  flex: 0 1 260px;
  padding: 6px 8px;
  border: 1px solid rgba(184, 59, 59, 0.22);
  border-radius: var(--radius);
  background: rgba(184, 59, 59, 0.08);
  color: var(--danger);
  text-align: right;
}

.country-search-field {
  display: grid;
  gap: 6px;
}

.country-search-field span {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.country-search-field input {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 0.9rem;
}

.country-options-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 5px;
  max-height: 246px;
  overflow: auto;
  padding-right: 4px;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
}

.country-option:hover {
  border-color: var(--border);
  background: #ffffff;
}

.country-option.is-selected {
  border-color: rgba(139, 26, 196, 0.3);
  background: rgba(139, 26, 196, 0.08);
}

.country-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.country-option input {
  flex: 0 0 auto;
  width: auto;
  min-height: auto;
  padding: 0;
  accent-color: var(--brand-primary);
}

.country-option span {
  min-width: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.destination-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.advanced-destinations {
  margin-bottom: 18px;
}

.destination-provider,
.backend-panel,
.switch {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.destination-provider {
  padding: 13px;
}

.destination-provider .field + .field {
  display: block;
  margin-top: 10px;
}

.destination-provider input {
  background: #ffffff;
}

.destination-provider input[readonly] {
  color: var(--text-strong);
  cursor: default;
}

.advanced-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.ticketing-grid,
.conditional-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conditional-options {
  margin-top: 14px;
}

.conditional-options[hidden] {
  display: none;
}

.switch {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 9px 11px;
  cursor: pointer;
}

.switch input {
  flex: 0 0 auto;
  width: auto;
  min-height: auto;
  padding: 0;
  accent-color: var(--brand-primary);
}

.switch span {
  margin: 0 0 0 8px;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.tooltip-trigger {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  cursor: help;
  font-size: 0.92rem;
  font-weight: 800;
}

.tooltip-trigger::after {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 90;
  display: none;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 13px;
  border-radius: var(--radius);
  background: var(--nav-bg);
  box-shadow: var(--shadow-panel);
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  transform: translateX(-50%);
  white-space: pre-line;
}

.tooltip-trigger.is-open::after {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .tooltip-trigger:hover::after,
  .tooltip-trigger:focus-visible::after {
    display: block;
  }
}

.backend-grid {
  grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(0, 1.15fr) minmax(0, 1.15fr);
  margin-top: 14px;
}

.backend-panel {
  min-width: 0;
  padding: 13px;
}

.backend-label {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.backend-list {
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.backend-list p {
  margin-bottom: 6px;
}

.debug-ok {
  color: var(--success);
}

.debug-error {
  color: var(--danger);
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand-primary);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  transition: background-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.search-button:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.search-button:active {
  background: var(--brand-primary-active);
  transform: translateY(0);
}

.search-button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.airline-trust {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 8px 0 0;
}

.airline-logo-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
}

.airline-logo-list img {
  display: block;
  width: auto;
  max-width: 166px;
  height: 48px;
  object-fit: contain;
  opacity: 0.86;
  filter: grayscale(100%);
  transition: filter 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.airline-logo-list img.airline-logo-large {
  max-width: 223px;
  height: 64px;
}

.airline-logo-list img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-1px);
}

.results-section {
  padding: 46px 0 0;
}

.loading-state,
.empty-state,
.error-state {
  padding: clamp(20px, 3.2vw, 32px);
}

.loading-heading,
.result-summary,
.card-top,
.option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.spinner {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.skeleton-grid,
.destination-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  margin-top: 27px;
}

.skeleton-card {
  height: 185px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  animation: pulse 1.2s ease-in-out infinite alternate;
}

.provider-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 520px;
}

.provider-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.provider-pill i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.provider-pill.error i {
  background: var(--danger);
}

.destination-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  animation: rise 420ms both;
  animation-delay: var(--delay);
}

.destination-card:has(.options-details[open]) {
  grid-column: 1 / -1;
}

.destination-code,
.option-provider {
  margin-bottom: 8px;
  color: var(--brand-primary);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.destination-card h3 {
  color: var(--text-strong);
}

.destination-meta,
.card-source {
  margin: 0;
  font-size: 0.78rem;
}

.price {
  flex: 0 0 auto;
  text-align: right;
}

.price span {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.price strong {
  color: var(--brand-primary);
  font-size: 1.18rem;
  white-space: nowrap;
}

.card-source {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.options-details {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.options-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--brand-primary);
  color: #ffffff;
  transition: background-color 160ms ease, transform 160ms ease;
}

.options-summary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.options-summary b {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.options-details[open] .options-summary b {
  transform: rotate(180deg);
}

.options-details > summary {
  color: #ffffff;
}

.option-list {
  margin-top: 12px;
}

.flight-option {
  margin-top: 12px;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #eeeeee;
  box-shadow: var(--shadow-soft);
}

.option-provider {
  color: var(--text-muted);
  font-size: 0.6rem;
  margin-bottom: 4px;
}

.deal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.deal-total {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.deal-total span {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 800;
}

.deal-total strong {
  color: var(--text-strong);
  font-size: 1.24rem;
}

.deal-total small {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.share-button {
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.share-button:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.trip-leg-section {
  margin-top: 12px;
}

.trip-leg-section h4 {
  color: var(--text-strong);
}

.leg-title {
  margin-bottom: 7px;
  color: var(--brand-primary);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leg-timeline {
  display: grid;
  grid-template-columns: 72px 24px minmax(0, 1fr);
  row-gap: 7px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.timeline-time {
  text-align: right;
}

.timeline-time strong {
  display: block;
  color: var(--text-strong);
  font-size: 0.82rem;
}

.timeline-time span {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.timeline-time.is-missing strong {
  font-size: 0.68rem;
}

.timeline-time.is-missing span {
  font-size: 0.62rem;
  line-height: 1.25;
}

.timeline-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.timeline-track::before {
  position: absolute;
  top: 18px;
  bottom: -18px;
  width: 2px;
  background: #c9c9c9;
  content: "";
}

.timeline-track.end::before {
  display: none;
}

.timeline-track i {
  position: relative;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.timeline-airport {
  min-width: 0;
}

.timeline-airport strong {
  display: block;
  color: var(--text-strong);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.timeline-airport span {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.timeline-duration {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.timeline-plane {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.carrier-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 270px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.airline-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nav-bg);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
}

.airline-copy {
  display: grid;
  min-width: 0;
}

.airline-copy strong,
.carrier-row b {
  color: var(--text-strong);
  font-size: 0.74rem;
}

.airline-copy small {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.carrier-row b {
  margin-left: auto;
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin-left: 8px;
}

.book-link,
.unavailable {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 800;
}

.book-link {
  background: var(--brand-primary);
  color: #ffffff;
}

.book-link:hover {
  background: var(--brand-primary-hover);
  color: #ffffff;
}

.unavailable {
  color: var(--text-muted);
}

.stay-divider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-strong);
  font-size: 0.76rem;
  font-weight: 800;
}

.stay-divider a {
  color: var(--brand-primary);
  text-decoration: underline;
}

.show-all-options {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
}

.show-all-options:hover {
  border-color: var(--brand-primary);
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.detail-chips span {
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.62rem;
}

.detail-chips .missing-path-flag {
  color: var(--danger);
}

.empty-state,
.error-state {
  margin-top: 25px;
}

.empty-state p:last-child,
.error-state p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

.site-footer {
  clear: both;
  width: 100%;
  background: var(--footer-bg);
  color: #cfcfcf;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 32px;
  padding: 40px 0 30px;
}

.footer-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-grid p {
  margin-bottom: 0;
  color: #d8d8d8;
  font-size: 0.92rem;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  color: #e0e0e0;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-social-section {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.footer-social-links {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #ffffff;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.footer-social-links a:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  background: #ffffff;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}

.footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-left: auto;
}

.developer-credit {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.developer-credit:hover,
.developer-credit:focus-visible {
  color: var(--brand-primary);
}

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

@keyframes pulse {
  to {
    opacity: 0.45;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .primary-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-fields > :last-child {
    grid-column: 1 / -1;
  }

  .destination-fields,
  .advanced-grid,
  .backend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .destination-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container,
  .site-main {
    width: min(100% - 24px, var(--container));
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    min-height: 66px;
    flex-wrap: wrap;
    gap: 0 16px;
  }

  .brand {
    min-height: 66px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
    border-top: 1px solid #3a3a3a;
  }

  .site-nav[data-open="true"] {
    display: block;
  }

  .site-nav-list {
    display: block;
    padding: 8px 0 14px;
  }

  .site-nav a {
    padding: 14px 0;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    padding-left: 12px;
    border-left: 4px solid var(--brand-primary);
    background: transparent;
    color: #ffffff;
  }

  .site-main {
    padding-top: 32px;
  }

  .hero {
    padding-bottom: 22px;
  }

  .hero-title {
    font-size: clamp(1.05rem, 4.9vw, 1.4rem);
  }

  .primary-fields,
  .destination-fields,
  .advanced-grid,
  .conditional-options,
  .backend-grid,
  .destination-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .booking-bar {
    gap: 4px;
  }

  .booking-bar .field,
  .booking-bar .date-range-field {
    min-height: auto;
  }

  .destination-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .country-selector-header {
    flex-direction: column;
  }

  .country-limit-message {
    flex-basis: auto;
    width: 100%;
    text-align: left;
  }

  .range-calendar-panes {
    grid-template-columns: 1fr;
  }

  .range-popover {
    max-height: min(72vh, 620px);
  }

  .airline-logo-list {
    gap: 10px 14px;
  }

  .airline-logo-list img {
    max-width: 139px;
    height: 41px;
  }

  .airline-logo-list img.airline-logo-large {
    max-width: 186px;
    height: 55px;
  }

  .tooltip-trigger::after {
    top: calc(100% + 8px);
    right: 0;
    bottom: auto;
    left: auto;
    min-width: 230px;
    max-width: calc(100vw - 48px);
    transform: none;
  }

  .result-summary,
  .loading-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .provider-list {
    justify-content: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-social-section {
    justify-content: flex-start;
  }

  .footer-bottom-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .footer-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-left: 0;
  }

}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .search-shell {
    padding: 12px;
  }

  .date-range-inputs {
    grid-template-columns: 1fr;
  }

  .deal-header {
    grid-template-columns: 1fr;
  }

  .booking-actions {
    justify-content: stretch;
    margin-left: 0;
  }

  .book-link,
  .unavailable {
    width: 100%;
    text-align: center;
  }

  .share-button {
    display: none;
  }

  .card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .price {
    text-align: left;
  }

  .leg-timeline {
    grid-template-columns: 58px 18px minmax(0, 1fr);
    padding: 12px;
  }

  .timeline-time strong,
  .timeline-airport strong {
    font-size: 0.78rem;
  }

  .carrier-row {
    max-width: 100%;
    border-radius: var(--radius);
  }

}
