/* ArrivalScope — phone/tablet first, navy/gold (360-wide feel) */
:root {
  --navy: #1f3b5c;
  --navy-mid: #2a3a4a;
  --blue: #1a5fb4;
  --gold: #c9a227;
  --gold-soft: #e6d59a;
  --gold-bg: #fbf3d8;
  --ink: #1f3b5c;
  --muted: #5a6a7a;
  --muted-2: #6a7a8a;
  --line: #c5d4e0;
  --bg: #e8f0f7;
  --card: #ffffff;
  --sec: #8a6d00;
  --max: 420px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

.app {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(31,59,92,0.06), 0 8px 28px rgba(31,59,92,0.08);
}

/* Header */
.top {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px 12px;
  position: sticky; top: 0; z-index: 20;
}
.top .brand-row {
  display: flex; align-items: center; gap: 10px;
}
.top .logo {
  height: 48px; width: auto; display: block;
  background: #fff; border-radius: 6px; padding: 4px 8px;
}
.top .titles { flex: 1; min-width: 0; }
.top .brand {
  font-size: 12px; letter-spacing: 0.3px; opacity: 0.9; font-weight: 600;
}
.top h1 {
  margin: 1px 0 0; font-size: 18px; font-weight: 700; line-height: 1.15;
}
.top .meta {
  margin-top: 8px; font-size: 12px; opacity: 0.9; line-height: 1.35;
}
.top .meta strong { font-weight: 700; }
.top .meta .queried { display: inline-block; margin-top: 2px; }
.top .meta .queried strong {
  font-weight: 800;
  color: var(--gold);
  font-size: 13px;
}
.gold { color: var(--gold); }

/* Tabs */
.tabs {
  display: flex; gap: 0; background: var(--navy);
  padding: 0 8px;
  border-bottom: 3px solid var(--gold);
}
.tab {
  flex: 1;
  appearance: none; border: 0; background: transparent;
  color: rgba(255,255,255,0.75);
  font: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: 0.3px;
  padding: 10px 6px 12px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.tab[aria-selected="true"] {
  color: #fff;
  border-bottom-color: var(--gold);
}
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Sub-filters (E / F / Both) */
.subfilters {
  display: flex; gap: 8px; padding: 12px 14px 0;
}
.chip {
  appearance: none; border: 1px solid var(--line);
  background: #fff; color: var(--navy);
  font: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--navy); color: #fff; border-color: var(--navy);
}
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Panels */
.panel { display: none; padding: 12px 14px 28px; }
.panel.active { display: block; }

.notice {
  margin: 4px 14px 0;
  background: var(--gold-bg);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px; line-height: 1.25; color: var(--navy-mid);
}
.notice strong {
  color: var(--navy); letter-spacing: 0.25px; font-size: 9.5px;
  display: inline; margin: 0 5px 0 0; font-weight: 800;
}

.summary {
  margin: 12px 0 4px;
  font-size: 14px; font-weight: 700;
}
.summary .sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* Flight cards */
.flight-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.flight {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  page-break-inside: avoid;
}
.flight .banner {
  background: var(--navy); color: #fff;
  padding: 10px 12px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.flight .banner .conc { font-size: 15px; font-weight: 700; }
.flight .banner .src {
  font-size: 10px; letter-spacing: 0.4px; opacity: 0.85; text-transform: uppercase;
}
.flight .body { padding: 12px; }
.flt-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.city { font-size: 17px; font-weight: 700; }
.origin-block { min-width: 0; }
.ctry {
  font-size: 13px; color: var(--navy-mid); margin-top: 4px;
  display: flex; align-items: center; gap: 7px;
}
.flag {
  height: 14px; width: auto; max-width: 22px;
  border: 0.5px solid #999; border-radius: 1px;
  flex-shrink: 0; display: block;
}
.map-block { margin: 0 0 10px; }
.map {
  width: 100%; height: auto; max-height: 140px;
  object-fit: contain; background: #e8f0f7;
  border-radius: 4px; display: block;
}
.mapcap {
  font-size: 11px; color: #7a8a9a; margin: 4px 0 0;
  font-style: italic; line-height: 1.3;
}
.flt-num { font-size: 24px; font-weight: 800; line-height: 1.05; text-align: right; }
.flt-al { font-size: 12px; color: var(--muted); text-align: right; margin-top: 2px; }
.toatl {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  color: var(--navy); margin: 10px 0 8px;
}
.timelabel {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--muted); margin: 0 0 2px;
}
.timebig { font-size: 22px; font-weight: 800; line-height: 1.1; }
.kv {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-top: 12px;
}
.kv .lab {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: var(--muted);
}
.kv .val { font-size: 18px; font-weight: 800; }
.kv .belt { font-size: 12px; color: var(--navy-mid); margin-top: 2px; font-weight: 500; }
.sec-tag {
  display: inline-block; background: var(--sec); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
  margin-left: 6px; vertical-align: middle;
}
.empty {
  text-align: center; color: var(--muted); padding: 28px 12px;
  font-size: 14px; line-height: 1.45;
}

/* Intelligence */
.intel-card {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin-top: 10px; background: #fff;
  page-break-inside: avoid;
}
.intel-card h3 {
  margin: 0 0 6px; font-size: 15px; font-weight: 700;
}
.intel-card .when {
  font-size: 11px; color: var(--muted); font-weight: 700;
  letter-spacing: 0.3px; margin-bottom: 6px;
}
.intel-card p {
  margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--navy-mid);
}
.intel-card .tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; font-weight: 700; color: var(--navy);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 8px;
}


/* Arrival Scope Intelligence */
.intel-brand {
  margin: 4px 0 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fafc 0%, #fff 100%);
}
.intel-product {
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--muted); text-transform: uppercase;
}
.intel-report {
  margin: 2px 0 0; font-size: 18px; font-weight: 800; color: var(--navy);
  line-height: 1.2;
}
.intel-pdf {
  margin-top: 10px;
  padding: 12px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: var(--gold-bg);
  display: flex; flex-direction: column; gap: 8px;
}
.intel-pdf .pdf-label {
  font-size: 12px; font-weight: 700; color: var(--navy);
}
.intel-pdf .pdf-meta {
  font-size: 11px; color: var(--muted); line-height: 1.35;
}
.intel-pdf .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.intel-pdf .btn { flex: 1; min-width: 120px; padding: 12px 14px; font-size: 14px; }
.intel-card ul.bullets {
  margin: 6px 0 0; padding-left: 18px;
  font-size: 13px; line-height: 1.4; color: var(--navy-mid);
}
.intel-card ul.bullets li { margin: 3px 0; }

/* PDF panel */
.pdf-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.btn {
  appearance: none; border: 0; border-radius: 10px;
  background: var(--navy); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700;
  padding: 14px 16px; cursor: pointer; text-align: center;
}
.btn.secondary {
  background: #fff; color: var(--navy); border: 2px solid var(--navy);
}
.btn.gold {
  background: var(--gold); color: #1f3b5c;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 8px; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; }
.file-list li {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 13.5px;
}
.file-list .name { font-weight: 700; }
.file-list .meta { font-size: 11px; color: var(--muted); }

.foot {
  padding: 16px 14px 24px;
  font-size: 11px; color: var(--muted-2); line-height: 1.4;
  border-top: 1px solid var(--line);
}
.foot .pn { color: var(--navy); font-weight: 600; }
.foot .credit {
  margin-top: 8px; font-size: 11px; color: var(--muted-2);
  font-style: italic;
}

/* Print / PDF */
@media print {
  body { background: #fff; }
  .app { box-shadow: none; max-width: none; }
  .top { position: static; }
  .tabs, .subfilters, .pdf-actions, .btn, .notice.print-hide { display: none !important; }
  .panel { display: none !important; padding: 0; }
  .panel.active, .panel.print-include { display: block !important; }
  .flight, .intel-card { break-inside: avoid; }
  @page { margin: 12mm; }
}

@media (min-width: 720px) {
  :root { --max: 480px; }
}




/* Live RSS intel ticker (between Infax notice and concourse chips) */
.rss-ticker {
  display: flex; align-items: stretch; gap: 0;
  margin: 6px 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f2740;
  color: #fff;
  overflow: hidden;
  min-height: 34px;
}
.rss-label {
  flex: 0 0 auto;
  background: var(--gold);
  color: #1f3b5c;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.6px;
  padding: 0 8px;
  display: flex; align-items: center;
}
.rss-viewport {
  flex: 1; min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.rss-track {
  display: inline-flex; align-items: center; gap: 0;
  white-space: nowrap;
  padding: 8px 0;
  will-change: transform;
}
.rss-track.anim {
  animation: rss-scroll var(--rss-duration, 180s) linear infinite;
}
.rss-ticker:hover .rss-track.anim { animation-play-state: paused; }
.rss-item {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 0 18px;
  font-size: 12px; line-height: 1.25;
  color: #e8f0f7;
  text-decoration: none;
}
.rss-item:hover { text-decoration: underline; color: #fff; }
.rss-item .src {
  color: var(--gold-soft);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.rss-sep { color: rgba(255,255,255,0.35); padding: 0 2px; font-weight: 700; }
@keyframes rss-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
