/* =====================================================================
   "Choose your airline" section (home page). Uses the page's own tokens
   (--paper, --ink, --blue, --line, --mono …) so it follows light/dark mode.
   ===================================================================== */
.sec.al-section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(24px, 4vw, 48px); }
.al-section .sec-head { margin-bottom: 26px; }
.al-lead { margin: 12px 0 0; max-width: 52ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.5; color: var(--ink-2); }
.al-status { text-align: right; line-height: 1.6; }
.al-status b { color: var(--ink); font-weight: 600; }

/* search */
.al-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.al-search {
  position: relative; display: flex; align-items: center; width: min(100%, 360px); height: 46px; padding: 0 16px 0 44px;
  border-radius: 999px; background: var(--paper); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.al-search svg { position: absolute; left: 16px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.al-search input {
  width: 100%; height: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: 500 14.5px/1 var(--sans);
}
.al-search input::placeholder { color: var(--muted); }
.al-search input::-webkit-search-cancel-button { cursor: pointer; }
.al-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }

/* cards */
.al-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.al-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0;
  padding: 16px 16px 15px; border-radius: 18px; background: var(--paper); border: 1px solid transparent; cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .25s, background-color .25s, box-shadow .3s;
  animation: al-in .35s cubic-bezier(.2,.7,.2,1) both;
}
.al-card[hidden] { display: none; }
.al-card:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: 0 14px 30px -22px rgba(40, 20, 10, .45); }
.al-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.al-card:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.al-card:focus-within:not(:has(:focus-visible)) { outline: none; }
.al-card.is-selected {
  border-color: var(--blue); background: color-mix(in srgb, var(--blue) 7%, var(--paper));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent), 0 18px 36px -26px color-mix(in srgb, var(--blue) 70%, transparent);
}
.al-logo { display: block; width: 40px; height: 40px; flex: none; }
.al-logo svg, .al-logo img { display: block; width: 100%; height: 100%; border-radius: 11px; object-fit: contain; }
.al-logo img { background: #fff; }
.al-text { display: grid; gap: 5px; min-width: 0; max-width: 100%; }
.al-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.al-code { font: 600 11px/1 var(--mono); letter-spacing: .14em; color: var(--muted); }
.al-check {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); color: #fff; transition: background .25s, border-color .25s;
}
.al-check svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.al-card.is-selected .al-check { background: var(--blue); border-color: var(--blue); }
.al-card.is-selected .al-check svg { opacity: 1; transform: scale(1); }
@keyframes al-in { from { opacity: 0; transform: translateY(6px); } }

.al-empty { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 22px; border-radius: 18px; background: var(--paper); color: var(--ink-2); font-size: 14.5px; }
.al-empty[hidden] { display: none; }
.al-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.al-foot .pill[hidden] { display: none; }
.al-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

@media (max-width: 1100px) { .al-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .al-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .al-status { text-align: left; }
}
@media (max-width: 560px) {
  /* compact two-column rows: badge beside the name */
  .al-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .al-card { flex-direction: row; align-items: center; gap: 10px; padding: 11px 30px 11px 11px; border-radius: 14px; }
  .al-logo { width: 30px; height: 30px; }
  .al-logo svg, .al-logo img { border-radius: 9px; }
  .al-text { gap: 3px; }
  .al-name { font-size: 13.5px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .al-code { font-size: 10px; }
  .al-check { top: 50%; right: 9px; width: 18px; height: 18px; transform: translateY(-50%); }
  .al-check svg { width: 10px; height: 10px; }
  .al-search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .al-card { animation: none; transition: none; } .al-check svg { transition: none; } }
