html,
body {
  min-width: 320px;
}

.site-header {
  background: var(--paper);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-nav {
  font-size: 0.98rem;
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  list-style: none;
  font-size: 1.35rem;
  font-weight: 900;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::marker {
  content: "";
}

.mobile-nav[open] summary {
  background: var(--stone);
}

.mobile-nav-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 210px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
}

.mobile-nav-menu a {
  display: block;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.mobile-nav-menu a + a {
  border-top: 1px solid var(--stone-dark);
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus-visible {
  background: var(--forest-soft);
}

.eyebrow,
.step-count,
.note-kicker {
  font-size: 0.86rem;
}

.note-small,
.field small,
.deadline-example,
.notice-box,
.table-note,
.history-note,
.plain-result-strip span,
.coverage-line span,
.distribution-labels small,
.confirmation-card span {
  font-size: 0.92rem;
}

.progress-step {
  color: #626662;
  font-size: 0.82rem;
}

.progress-step span {
  color: #626662;
}

.review-grid span,
.result-status,
.flight-table th,
.method-grid span,
.result-explanation-grid span,
.consistency-head {
  font-size: 0.84rem;
}

.flight-table th small {
  font-size: 0.82rem;
}

.badge {
  font-size: 0.78rem;
}

.flight-table tr.is-unsupported {
  color: #626662;
}

.site-footer {
  font-size: 0.95rem;
}

.nav-cta,
.restart-search,
.method-details summary,
.airport-toggle {
  min-height: 44px;
}

.search-card-tools {
  min-height: 44px;
  margin: -8px 0 36px;
}

.restart-search {
  font-size: 0.9rem;
}

.airport-field-grid > .airport-field {
  grid-template-rows: auto auto minmax(3rem, auto);
  align-content: start;
}

.airport-combobox {
  position: relative;
  min-width: 0;
}

.airport-input-wrap {
  position: relative;
}

.airport-input-wrap .airport-input {
  padding-right: 54px;
}

.airport-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  bottom: 3px;
  width: 46px;
  padding: 0;
  border: 0;
  border-left: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
}

.airport-toggle:hover,
.airport-toggle.is-open {
  background: var(--stone);
}

.airport-toggle span {
  display: inline-block;
  transition: transform 100ms ease;
}

.airport-toggle.is-open span {
  transform: rotate(180deg);
}

.airport-options {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 18px;
  right: 0;
  max-height: 310px;
  margin: 0;
  padding: 5px;
  overflow-y: auto;
  list-style: none;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  transform-origin: top right;
}

.airport-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 11px 12px;
  cursor: pointer;
}

.airport-option + .airport-option {
  border-top: 1px solid var(--stone-dark);
}

.airport-option:hover,
.airport-option.is-active {
  background: var(--forest-soft);
  outline: 2px solid var(--forest-dark);
  outline-offset: -2px;
}

.airport-option strong {
  font-size: 0.98rem;
}

.airport-option span,
.airport-menu-message {
  color: #353936;
  font-size: 0.92rem;
}

.airport-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airport-menu-message {
  padding: 14px 12px;
}

.method-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  list-style: none;
}

.method-details summary::-webkit-details-marker {
  display: none;
}

.method-details summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  background: var(--stone);
  font-size: 1.35rem;
  line-height: 1;
}

.method-details[open] summary::after {
  content: "−";
}

/* Programmatic focus helps screen-reader orientation, but static step headings
   should not look like selected form controls. */
.form-step h3[tabindex="-1"]:focus {
  outline: none;
}

.result-summary:focus {
  outline: 4px solid rgba(31, 90, 61, 0.26);
  outline-offset: 5px;
}

/* Switch the comparison to stacked cards before the desktop table starts to
   require horizontal scrolling. */
@media (max-width: 860px) {
  .flight-table-wrap {
    overflow: visible;
    border: 0;
  }

  .flight-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
  }

  .flight-table thead {
    display: none;
  }

  .flight-table tbody {
    display: grid;
    gap: 12px;
  }

  .flight-table tbody tr {
    display: block;
    border: 2px solid var(--ink);
    background: var(--paper);
  }

  .flight-table tbody tr.is-recommended {
    background: var(--forest-soft);
  }

  .flight-table td {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.1fr);
    gap: 14px;
    align-items: start;
    padding: 11px 12px;
    border-bottom: 1px solid var(--stone-dark);
  }

  .flight-table td:last-child {
    border-bottom: 0;
  }

  .flight-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .flight-table .cell-value {
    min-width: 0;
    text-align: right;
  }

  .flight-table .badge {
    display: inline-block;
    margin-top: 5px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .consistency-card,
  .consistency-cell,
  .distribution-segment {
    font-size: 0.9rem;
  }

  .search-card-tools {
    margin: -4px 0 30px;
  }

  .progress-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .progress-line {
    display: none;
  }

  .progress-step {
    gap: 5px;
    min-width: 0;
  }

  .progress-step b {
    display: block;
    font-size: 0.72rem;
  }

  .airport-field-grid > .airport-field {
    grid-template-rows: auto auto auto;
  }

  .airport-options {
    max-height: 270px;
    left: 10px;
  }

  .flight-table td {
    grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 380px) {
  .shell {
    width: min(calc(100% - 20px), var(--max));
  }

  .search-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .airport-option {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    padding-left: 9px;
    padding-right: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
