:root {
  color-scheme: light;
  --ink: #172c2a;
  --muted: #4d625d;
  --brand: #13614c;
  --strong: #0d493a;
  --paper: #f1f5f2;
  --panel: #fff;
  --line: #cddbd4;
  --edge: #748b7c;
  --focus: #965100;
  --error: #9b3124;
  font: 400 16px/1.45 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
a { color: var(--strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.shell { width: min(100%, 1040px); margin-inline: auto; padding: 0 26px 40px; }
.masthead {
  display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center;
  gap: 6px 12px; min-height: 58px; border-bottom: 1px solid var(--line);
}
.brand { color: var(--strong); font-weight: 760; letter-spacing: .01em; text-decoration: none; }
.sample-label, .small { font-size: .875rem; }
.sample-label, .muted { color: var(--muted); }
.intro { padding: 24px 0 19px; }
h1 { font: 400 clamp(2rem, 5vw, 3.05rem)/1.09 Georgia, serif; letter-spacing: -.02em; }
.intro p { color: var(--muted); margin-top: 6px; }
h2 { font-size: 1.47rem; letter-spacing: -.024em; }
h3 { font-size: 1.15rem; letter-spacing: -.012em; }
h4 { font-size: .99rem; }
.search-panel, .result-card, .calendar, .empty, .what-if {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.search-panel { padding: 18px; }
.grid { display: grid; min-width: 0; gap: 10px 14px; }
.route-fields, .date-fields, .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.when-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.basic-settings, .thirds, .window-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.preference-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sample-note { color: var(--muted); margin: 5px 0 12px; }
.basic-settings { margin-top: 11px; }
.field { min-width: 0; }
.field label, fieldset legend { display: block; font-weight: 650; font-size: .9rem; }
.field label { margin-bottom: 4px; }
.field input, .field select {
  display: block; min-width: 0; width: 100%; min-height: 44px; color: var(--ink);
  border: 1px solid var(--edge); border-radius: 8px; padding: 6px 9px;
  background: var(--panel); font: inherit;
}
.trip-summary {
  margin-top: 13px; padding: 8px 11px; color: var(--strong);
  background: #eef6f0; border-radius: 7px; font-size: .89rem;
}
.search-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin-top: 12px; align-items: start; }
summary {
  width: fit-content; min-height: 44px; align-content: center; color: var(--strong);
  font-size: .94rem; font-weight: 710; cursor: pointer;
}
.primary {
  min-height: 44px; border: 1px solid var(--strong); border-radius: 8px;
  padding: 8px 22px; font: 700 1rem/1.25 system-ui, sans-serif;
  color: white; background: var(--brand); cursor: pointer;
}
.primary:hover { background: var(--strong); }
.preference-groups { margin-top: 2px; border-top: 1px solid var(--line); }
.preference-group { border-bottom: 1px solid var(--line); padding-inline: 3px; }
.pref-content { display: grid; gap: 9px; padding-bottom: 11px; }
fieldset { margin: 0; min-width: 0; padding: 0; border: 0; }
fieldset legend { padding: 0; margin-bottom: 2px; color: var(--brand); }
#id_modes, #id_family_help {
  display: grid; gap: 0 8px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
#id_modes label, #id_family_help label, .check {
  display: flex; align-items: center; min-height: 44px; gap: 7px; font-size: .91rem;
}
input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--brand); }
.form-errors { color: var(--error); margin-bottom: 10px; }
.form-errors a, .errorlist { color: var(--error); }
.form-errors ul, .errorlist { margin: 4px 0; padding-left: 18px; }

#results { margin-top: 23px; scroll-margin-top: 10px; }
.section-heading {
  display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center;
  gap: 5px 12px;
}
.action-link, .priorities a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 5px 10px; border-radius: 7px; font-weight: 650;
}
.priorities { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 11px; }
.priorities a { background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-size: .89rem; }
.priorities a[aria-current=true] { color: white; background: var(--strong); border-color: var(--strong); }
.result-card { margin-bottom: 10px; padding: 15px 17px 4px; }
.result-card.recommended { background: #f5fbf7; border-color: #83ad99; }
.result-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.dates, .price span { color: var(--muted); font-size: .87rem; }
.price { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.price strong { font-size: clamp(1.45rem, 4.5vw, 1.95rem); line-height: 1.05; }
.story { margin: 8px 0 5px; font-weight: 600; }
.comparison-line { margin: 4px 0; color: var(--strong); }
.comparison-line .small { display: inline-block; }
.metrics {
  display: flex; flex-wrap: wrap; gap: 5px clamp(14px, 4vw, 36px);
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
}
.metrics dt { color: var(--muted); font-size: .8rem; }
.metrics dd { font-weight: 720; }
.itinerary[open] { padding-bottom: 12px; }
.timeline { margin: 12px 0; }
.timeline h4 { color: var(--strong); }
.timeline ol { list-style: none; padding: 0; margin: 3px 0; }
.timeline li {
  display: grid; grid-template-columns: minmax(128px, 1fr) 3fr; gap: 4px 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.event-time { color: var(--muted); font-size: .85rem; }
.cost-lines { margin-top: 3px; }
.cost-lines div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.cost-lines dd { font-weight: 670; white-space: nowrap; }
.reference { padding-top: 9px; }
.reference p { font-size: .9rem; }
.coverage, .empty, .what-if, .calendar { margin-top: 9px; }
.empty, .what-if, .calendar { padding: 4px 13px; }
.empty { padding: 13px; }
.what-if[open], .calendar[open] { padding-bottom: 13px; }
.savings-adjustment { display: flex; flex-wrap: wrap; align-items: end; gap: 7px 10px; margin-bottom: 7px; }
.secondary {
  min-height: 44px; border: 1px solid var(--brand); border-radius: 8px; padding: 7px 11px;
  font: 650 .89rem/1.2 system-ui, sans-serif; background: var(--panel); color: var(--strong); cursor: pointer;
}
.what-if ul, .dates-list ul { margin: 0 0 7px; padding-left: 18px; }
.what-if a, .dates-list a { display: inline-flex; align-items: center; min-height: 44px; }
.calendar-scroll { position: relative; overflow-x: auto; padding: 4px; margin: 8px -4px 4px; }
table { width: 100%; border-spacing: 3px; font-size: .83rem; }
th { color: var(--muted); text-align: center; white-space: nowrap; }
th[scope=row] { text-align: left; }
td { min-width: 75px; text-align: center; }
.cell-price, .cell-unavailable {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 44px; padding: 4px 5px; border-radius: 6px;
}
.cell-price { background: #e7efea; text-decoration: none; font-weight: 725; }
.cell-price span { font-size: .71rem; }
.cell-price:hover { text-decoration: underline; }
.cell-price.tone-0 { background: #cbe8d6; }
.cell-price.tone-1 { background: #e0efda; }
.cell-price.tone-2 { background: #f0eed7; }
.cell-price.tone-3 { background: #f7e8d0; }
.cell-price.balanced-cell { box-shadow: inset 0 0 0 2px var(--brand); }
.cell-price[aria-current=true] { color: #fff; background: var(--strong); }
.cell-unavailable { background: #eff3ef; color: var(--muted); }

@media (max-width: 740px) {
  .shell { padding-inline: 15px; }
  .when-fields { grid-template-columns: minmax(0, 1fr); }
  .preference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .shell { padding-inline: 10px; }
  .masthead { min-height: 49px; }
  .intro { padding: 16px 1px 13px; }
  .intro p { font-size: .92rem; }
  .search-panel { padding: 12px; }
  .grid { gap: 8px; }
  .basic-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .basic-settings > :last-child { grid-column: 1 / -1; }
  .window-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preference-grid { grid-template-columns: minmax(0, 1fr); }
  .search-actions { grid-template-columns: minmax(0, 1fr); }
  .result-card { padding: 12px 12px 4px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .comparison-line .small { display: block; }
}

.airport-section { margin-top: 19px; }
.airport-section > p { margin: 4px 0 10px; }
.airport-card { padding-bottom: 12px; }
.airport-card > p { margin-top: 7px; }
.airport-card .route-name { color: var(--muted); font-size: .9rem; }
.access-list { min-width: 0; padding-top: 7px; }
.access-list ul, .pair-list ul { margin: 5px 0; padding-left: 18px; }
.access-list li, .pair-list li { margin-bottom: 5px; }
.quote-fields { margin: 12px 0; }
.quote-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pair-list { margin-top: 7px; }
.source-note { margin-top: 14px; }
@media (max-width: 460px) {
  .planner .route-fields { grid-template-columns: minmax(0, 1fr); }
}

.saved-quotes { list-style: none; margin: 10px 0; padding: 0; }
.saved-quotes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.saved-quotes form { margin: 0; }
.quote-link { display: inline-flex; min-height: 44px; align-items: center; }
#pair-filter { display: block; width: min(100%, 300px); margin: 4px 0; }
#pair-filter[hidden] { display: none; }
#quote-form { margin-top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.date-flex { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.save-search { margin-top: 16px; }
.save-search[hidden], #resume-query[hidden], #forget-query[hidden] { display: none; }

.planner .shell { max-width: 900px; }
.planner-intro { padding: clamp(22px, 5vw, 54px) 0 22px; }
.planner-intro p { max-width: 58ch; }
.planner .search-panel { padding: clamp(14px, 3vw, 28px); }
.trip-basics { grid-template-columns: 1.3fr .65fr 1.2fr; margin-block: 16px 8px; }
.planner .trip-summary { margin: 12px 0 2px; }
.planner .pref-content { border-top: 1px solid var(--line); padding: 14px 0; }
.planner .pref-content h3 { font-size: 1rem; }
.planner .trip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; }
.planner .trip-actions a, .planner .pair-choice { padding-block: 10px; }
.planner .edit-trip { margin-top: 12px; }
.planner #results-heading { font-size: clamp(1.65rem, 4vw, 2.4rem); }
.planner .coverage { padding: 12px 16px; border-left: 3px solid var(--brand); background: #e7f0e9; }
.planner .airport-card .route-name { font-size: 1rem; color: var(--ink); }
.planner .pair-choice { background: transparent; color: var(--strong); border: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.planner #profile-controls p { margin-top: 6px; }
@media (max-width: 560px) {
  .planner .trip-basics { grid-template-columns: .72fr 1.28fr; }
  .planner .trip-basics > :first-child { grid-column: 1 / -1; }
  .planner .trip-actions { display: grid; text-align: center; }
  .planner .result-heading { flex-wrap: wrap; }
}
.source-lookup { margin-top: 10px; }
.source-lookup p { margin-top: 4px; }
.planner .cost-lines dd { min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: right; }

.savings-guide { margin: 1rem 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.savings-lead, .savings-next { padding: clamp(1rem, 3vw, 1.4rem); }
.savings-lead { background: #edf6ef; }
.savings-next { background: var(--panel); border-top: 1px solid var(--line); }
.savings-step { color: var(--brand); font-weight: 650; }
.savings-guide h2 { margin: .2rem 0 .45rem; }
.savings-guide h3 { margin-bottom: .35rem; }
.savings-lead .quote-link { margin-right: .75rem; }

.primary-link { display: inline-flex; align-items: center; text-decoration: none; }
.fare-steps { display: grid; gap: 6px; padding: 0; margin: 14px 0 16px; list-style: none; }
.fare-steps li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.fare-steps strong { margin-left: .25rem; }
.step-saved { color: var(--strong); font-weight: 650; }
.finish-option { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.finish-option .quote-link { min-height: 44px; }
#trip-next, #ground-form, #quote-form, #flight-schedule, #entered-fares { scroll-margin-top: 12px; }

.fare-route-grid, .ground-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fare-route-grid .wide-field { grid-column: 1 / -1; }
.fare-handoff { padding: 12px; background: #edf6ef; border-radius: 9px; }
.fare-handoff p { margin-block: 0 6px; }
.fare-price { margin: 14px 0 4px; max-width: 22rem; }
.fare-price p { margin-top: 5px; }
.editor-actions { margin-top: 12px; }
#entered-fares { margin-top: 12px; border-top: 1px solid var(--line); }
.ground-sides { margin-top: 12px; gap: 14px; }
.ground-sides fieldset { padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; }
.ground-sides legend { padding-inline: 5px; }
.ground-other { align-items: end; margin-block: 12px 4px; }
.ground-other .field { flex: 1 1 15rem; }
.ground-sides summary { font-size: .875rem; }
.ground-rentals .field { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ground-rentals .field label { flex: 1; margin: 0; }
.ground-rentals .field input { width: 18px; min-height: 18px; order: -1; }
@media (max-width: 540px) {
  .ground-sides { grid-template-columns: minmax(0, 1fr); }
  .savings-lead .primary-link, .editor-actions .primary { justify-content: center; width: 100%; }
}
@media (max-width: 355px) {
  .fare-route-grid { grid-template-columns: minmax(0, 1fr); }
}
