/* BLADES — "Straight from the app": the logbook spread, fleet cards and airport globe, in the app's own look. */

@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-roman.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

.inapp {
  /* The app's navy palette (constants/colors.ts) */
  --app-bg: #0a1628;
  --app-card: #0f1e3a;
  --app-elev: #152338;
  --app-border: #1a3a5a;
  --app-sep: #122030;
  --app-text2: #7fa8c8;
  --app-muted: #3a5a7a;
  --app-accent: #00c8e8;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --fraunces: "Fraunces", Georgia, serif;

  background: var(--app-bg);
  color: var(--white);
  padding: clamp(96px, 11vw, 150px) 0 clamp(96px, 11vw, 150px);
  overflow: hidden;
}
.inapp-head { text-align: center; padding: 0 var(--pad); }
.inapp h2 { font-size: clamp(36px, 4.4vw, 64px); color: var(--white); }
.inapp .section-sub { color: var(--mist); }

/* Manned / unmanned switch, in the app's segmented style */
.mode {
  display: inline-flex; gap: 3px; margin-top: 32px; padding: 4px;
  border-radius: 999px; background: var(--app-card);
  box-shadow: inset 0 0 0 1px var(--app-border);
}
.mode-btn {
  height: 42px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: none; color: var(--app-text2);
  font: 600 15px/1 var(--sans);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.mode-btn:hover { color: var(--white); }
.mode-btn[aria-pressed="true"] { background: var(--app-accent); color: var(--app-bg); }

.demo { max-width: 1240px; margin: clamp(64px, 8vw, 104px) auto 0; padding: 0 var(--pad); }
.demo-text { max-width: 640px; margin-bottom: 28px; }
.demo-text h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.demo-text p { margin-top: 10px; color: var(--mist); }
.demo [data-swap] { transition: opacity 0.25s ease; }
.is-swapping [data-manned] { opacity: 0; }

/* ---------- Logbook spread (the app's own HTML, scaled to fit) ---------- */
.book-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #ece3cc;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.book { display: block; border: 0; transform-origin: 0 0; background: #ece3cc; }
.book-hint { display: none; }
@media (max-width: 820px) {
  .book-frame { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .book-hint { display: block; margin-top: 12px; font-size: 14px; color: var(--mist); }
  .book-open { display: inline-flex; align-items: center; min-height: 44px; color: var(--app-accent); font-weight: 600; text-underline-offset: 3px; }
}

/* ---------- Fleet cards (components/logbook-page/FleetCard.tsx) ---------- */
.fleet-strip {
  display: flex; align-items: flex-start; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--pad)); padding: 4px var(--pad) 18px;
  scrollbar-width: none;
}
.fleet-strip::-webkit-scrollbar { display: none; }
.fleet-strip.is-dragging { scroll-snap-type: none; cursor: grabbing; }
@media (hover: hover) and (pointer: fine) { .fleet-strip { cursor: grab; } }
.fc {
  flex: 0 0 min(340px, 84vw); scroll-snap-align: start;
  position: relative; overflow: hidden;
  border-radius: 18px; background: var(--app-card);
  box-shadow: inset 0 0 0 1px var(--app-border);
  color: var(--white);
  user-select: none;
  animation: fc-in 0.5s var(--ease) both;
}
.fc:nth-child(2) { animation-delay: 0.05s; } .fc:nth-child(3) { animation-delay: 0.1s; } .fc:nth-child(4) { animation-delay: 0.15s; }
@keyframes fc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fc.drone { --app-elev: #16314e; --app-text2: #a8bfd6; --app-muted: #5a7fa0; }
.fc-banner { position: relative; height: 110px; overflow: hidden; background: var(--app-elev); }
.fc-banner img { position: absolute; left: -2.5%; width: 105%; max-width: none; height: 110px; object-fit: cover; object-position: 50% 42%; -webkit-user-drag: none; pointer-events: none; }
.fc-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15, 30, 58, 0) 38%, rgba(15, 30, 58, 0.533) 78%, #0f1e3a 100%); }
.fc-credit {
  position: absolute; z-index: 1; top: 9px; left: 10px; max-width: 62%;
  font: 9px/1.3 var(--sans); color: rgba(255, 255, 255, 0.78); text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fc-credit:hover { color: var(--white); text-decoration: underline; }
.fc-body { padding: 13px 15px 14px; }
.fc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 8px; margin-bottom: 3px; border-bottom: 1px solid var(--app-sep); }
.fc-type { font: 600 27px/1.1 var(--fraunces); letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-maker { margin-top: 3px; font: 12px/1.2 var(--sans); color: var(--app-muted); }
.fc-total { font: 600 24px/1 var(--fraunces); white-space: nowrap; }
.fc-h { font: 700 10.5px var(--mono); color: var(--app-accent); }
.fc.drone .fc-head { border-bottom: 0; margin-bottom: 13px; padding-bottom: 0; }
.fc-ft { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--app-sep); }
.fc-ft span { font: 700 9px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--app-muted); }
.fc-ft b { font: 600 30px/1 var(--fraunces); }
.fc-ft b i { font: 700 11px var(--mono); color: var(--app-accent); font-style: normal; }
.fc-group { margin-top: 11px; }
.fc-gh { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; font: 700 8.5px var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--app-accent); }
.fc-gh svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fc-row { display: flex; }
.fc-cell { flex: 1; min-width: 0; padding: 0 11px; display: grid; gap: 3px; }
.fc-cell:first-child { padding-left: 0; }
.fc-cell + .fc-cell { border-left: 1px solid var(--app-sep); }
.fc-cell span { font: 700 8.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--app-muted); }
.fc-cell b { font: 700 15px var(--mono); white-space: nowrap; }
.fc-cell b i { font: 500 9px var(--mono); font-style: normal; color: var(--app-muted); }
.fc-regs { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--app-sep); }
.fc-regs-h { display: flex; justify-content: space-between; margin-bottom: 7px; font: 700 8.5px var(--mono); letter-spacing: 1px; color: var(--app-muted); }
.fc-regs-h b { font-size: 9px; color: var(--app-text2); }
.fc-reg { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.fc-reg[hidden] { display: none; }
.fc-reg b { font: 700 13px var(--mono); letter-spacing: 0.3px; color: var(--app-text2); }
.fc-reg i { flex: 1; border-bottom: 1px dotted var(--app-border); transform: translateY(-3px); }
.fc-reg span { font: 10.5px var(--mono); color: var(--app-muted); }
.fc-more {
  display: block; width: 100%; min-height: 40px; margin-top: 9px; padding: 6px 0; cursor: pointer;
  border: 1px solid var(--app-border); border-radius: 8px; background: none;
  font: 700 9.5px var(--mono); letter-spacing: 0.6px; color: var(--app-accent);
}
.fc-more:hover { background: rgba(0, 200, 232, 0.08); }
.fc-foot { display: flex; align-items: flex-end; margin-top: 11px; }
.fc-foot div { display: grid; gap: 2px; margin-right: 18px; }
.fc-foot span { font: 700 8.5px var(--mono); letter-spacing: 0.8px; text-transform: uppercase; color: var(--app-muted); }
.fc-foot b { font: 700 11px var(--mono); color: var(--app-text2); }

/* ---------- Airport globe ---------- */
.globe-panel {
  position: relative;
  border-radius: clamp(20px, 2.4vw, 30px);
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 60%, #102542 0%, #060d1a 70%);
  box-shadow: inset 0 0 0 1px var(--app-border);
}
.globe-text { position: absolute; z-index: 3; left: clamp(22px, 4vw, 48px); top: clamp(22px, 4vw, 44px); max-width: 360px; pointer-events: none; }
.globe-text h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.globe-text p { margin-top: 10px; color: var(--mist); }
.globe { position: relative; z-index: 0; height: clamp(520px, 62vw, 720px); isolation: isolate; }
.globe > div { z-index: 0; }
.globe canvas { display: block; outline: none; }
.globe { pointer-events: none; }
/* Map pins (components/GlobalAirportMap.tsx) */
.gp {
  transform: translate(-50%, -50%);
  background: rgba(15, 22, 38, 0.92);
  color: var(--white);
  font: 800 12px/1 Menlo, var(--mono);
  letter-spacing: 0.3px; font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: box-shadow 0.2s ease;
}
.gp-cluster { min-width: 34px; height: 28px; padding: 0 9px; border-radius: 9px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--app-accent); }
.gp-ap { padding: 4px 7px; border-radius: 10px; font-size: 11px; letter-spacing: 0.5px; box-shadow: inset 0 0 0 1px var(--app-accent); }

@media (prefers-reduced-motion: reduce) {
  .fc { animation: none; }
}
@media (max-width: 820px) {
  .globe { height: 460px; }
  .globe-text { position: static; max-width: none; padding: 26px 22px 0; }
  .globe-text p { font-size: 15px; }
}

/* ---------- Find airport (components/AirportQuickSearch.tsx, AirportInfoCard.tsx, AirportRunwaySnippet.tsx) ---------- */
.gp-sel { box-shadow: inset 0 0 0 1.5px #f5c84b, 0 0 12px rgba(245, 200, 75, 0.9); z-index: 2; }

.ap-find { position: absolute; z-index: 4; left: clamp(22px, 4vw, 48px); top: clamp(170px, 18vw, 220px); width: min(340px, calc(100% - 44px)); }
.ap-search {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 9px; border-radius: 14px;
  background: rgba(6, 11, 22, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0, 200, 232, 0.4);
}
.ap-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--app-accent); }
.ap-sicon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(0, 200, 232, 0.13); }
.ap-sicon svg { width: 18px; height: 18px; fill: none; stroke: var(--app-accent); stroke-width: 2.2; stroke-linecap: round; }
#ap-q {
  flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none;
  color: var(--white); font: 700 16px var(--sans); letter-spacing: 0.2px;
}
#ap-q::placeholder { color: rgba(255, 255, 255, 0.5); font-weight: 600; }
.ap-clear { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255, 255, 255, 0.12); }
.ap-clear svg { width: 14px; height: 14px; fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; }
.ap-clear[hidden] { display: none; }
.ap-list {
  list-style: none; margin: 6px 0 0; padding: 0;
  max-height: 234px; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 12px; background: rgba(6, 11, 22, 0.97);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.ap-list[hidden] { display: none; }
.ap-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ap-row:last-child { border-bottom: 0; }
.ap-row:hover, .ap-row[aria-selected="true"] { background: rgba(0, 200, 232, 0.12); }
.ap-row b { font: 800 14px Menlo, var(--mono); letter-spacing: 0.4px; color: var(--white); }
.ap-row-mid { display: grid; min-width: 0; }
.ap-row-name { font: 600 13px var(--sans); color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row-place { margin-top: 1px; font: 500 11px var(--sans); color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row i { font: 700 12px var(--sans); font-style: normal; color: rgba(255, 255, 255, 0.7); }
.ap-empty { padding: 20px; text-align: center; font: 12.5px var(--sans); color: rgba(255, 255, 255, 0.55); }

.ap-result {
  position: absolute; z-index: 4; right: clamp(16px, 2.4vw, 28px); top: clamp(16px, 2.4vw, 28px);
  width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto;
  display: grid; gap: 10px;
  animation: fc-in 0.45s var(--ease) both;
}
.ap-result[hidden] { display: none; }
.ap-card {
  position: relative; border-radius: 14px;
  padding: 14px 46px 14px 16px;
  background: rgba(15, 22, 38, 0.96);
  box-shadow: inset 0 0 0 1px var(--app-border);
}
.ap-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 15px; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.14); }
.ap-close svg { width: 17px; height: 17px; fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; }
.ap-top { display: flex; gap: 12px; align-items: flex-start; }
.ap-id { display: grid; justify-items: center; }
.ap-id b { font: 800 22px Menlo, var(--mono); letter-spacing: 1px; color: var(--app-accent); }
.ap-flag { margin-top: 3px; font-size: 20px; line-height: 1; }
.ap-main { min-width: 0; padding-top: 2px; }
.ap-name { font: 600 13px/1.3 var(--sans); color: #a9c3dc; }
.ap-meta { margin-top: 5px; font: 700 10.5px var(--sans); letter-spacing: 0.3px; color: var(--app-accent); white-space: pre; }
.ap-place { margin-top: 4px; font: 600 11.5px var(--sans); color: var(--app-text2); }
.ap-freqs { display: flex; margin: 12px -30px 0 0; }
.ap-freqs div { flex: 0 0 25%; display: grid; gap: 2px; padding-right: 6px; }
.ap-freqs div + div { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.ap-freqs span { font: 700 9px Menlo, var(--mono); letter-spacing: 0.6px; color: #5a7fa0; }
.ap-freqs b { font: 800 16px var(--sans); font-variant-numeric: tabular-nums; color: var(--white); }

.ap-snip { position: relative; height: 315px; border-radius: 14px; overflow: hidden; background: #0f1e3a; box-shadow: inset 0 0 0 1px var(--app-border); }
.ap-tiles { position: absolute; inset: 0; }
.ap-tile { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.ap-rwy { position: absolute; inset: 0; }
.ap-rwy polygon { fill: rgba(24, 24, 27, 0.82); stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.2; stroke-linejoin: round; }
.ap-ident, .ap-dim { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; color: var(--white); text-shadow: 0 0 3px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.95); pointer-events: none; }
.ap-ident { font: 800 11px var(--sans); letter-spacing: 0.5px; }
.ap-dim { font: 700 9px var(--sans); letter-spacing: 0.3px; }
.ap-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--app-accent); box-shadow: 0 0 0 2px var(--white); }
.ap-nodata { position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 8px; background: rgba(15, 22, 38, 0.9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); font: 700 10.5px var(--sans); color: var(--app-text2); }
.ap-attr {
  position: absolute; left: 8px; right: 8px; bottom: 6px;
  font: 9px/1.3 var(--sans); color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.ap-snip.no-imagery { background: #0f1e3a radial-gradient(circle at 50% 50%, #16304f 0%, #0f1e3a 70%); }

@media (max-width: 820px) {
  .ap-find { position: static; width: auto; margin: 16px 22px 0; }
  .ap-result { position: static; width: auto; max-height: none; margin: 14px 16px 0; }
}
