/* SkyNelo content readability baseline - q1 - 2026-10-02 */
:root{
  --sky-content-micro:12px;
  --sky-content-small:13px;
  --sky-control-h:38px;
  --sky-control-h-mobile:42px;
}

/* Legacy content microcopy - exclude the new app shell and MapLibre chrome. */
body :where(.k,.eyebrow,.badge,.pill,.cat,.code,.meta,.muted,.source-chip,.source-note,.caption,.note,.hint,.section-sub,.service-state,.kind,.qid,.gen,.sub,.count,.time,.live,.iata,.disclaimer,.recent-title,.recent-note,.journey-desc,.favorite-note,.small){
  font-size:var(--sky-content-micro)!important;
  line-height:1.42!important;
}
body :where(.source-note,.caption,.note,.hint,.section-sub,.recent-note,.journey-desc,.disclaimer){
  line-height:1.55!important;
}

/* Data-dense screens. */
main table th,
main [role="table"] [role="columnheader"],
.w table th,
.page table th{
  font-size:12px!important;
  line-height:1.35!important;
}
main table td,
main [role="table"] [role="cell"],
.w table td,
.page table td{
  font-size:13px!important;
  line-height:1.42!important;
}
main table a,
main [role="table"] a,
.w table a,
.page table a,
main .row a,
.w .row a{
  font-size:12px!important;
  line-height:1.4!important;
  min-height:24px;
  display:inline-flex;
  align-items:center;
}

/* Button-like controls used across legacy modules. */
body :where(.watch,.btn,.action,.type-action,.hero-action,.cta,.fav-airport,.more-btn,.clear,.tab,.recent-clear,.recent-chip,.select,.nexa-language-select){
  min-height:var(--sky-control-h)!important;
  min-width:36px;
  font-size:12px!important;
  line-height:1.2!important;
  padding:7px 10px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
main button,
main select,
main input[type="button"],
main input[type="submit"],
main input[type="search"],
main input[type="text"],
.w button,
.w select,
.w input[type="button"],
.w input[type="submit"],
.w input[type="search"],
.w input[type="text"]{
  min-height:var(--sky-control-h);
  font-size:13px;
}

/* Radar controls are outside <main>. */
.nexa-radar-page :where(.renderer-toggle,.terrain-toggle,.world-toggle,.filter-toggle,.radar-explore-link,.platform-menu-toggle,.menu-mobile){
  min-height:38px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
.nexa-radar-page :where(.renderer-label,.livery-legend-count){
  font-size:12px!important;
}

/* Immersive replay controls. */
.nexa-immersive-page :where(.btn,.select){
  min-height:40px!important;
  min-width:40px;
  font-size:12px!important;
}
.nexa-immersive-page :where(.meta,.badge,.k,.time,.muted,.sub,.note){
  font-size:12px!important;
}

/* Preserve compact third-party map controls. */
.maplibregl-control-container,
.maplibregl-control-container *{
  font-size:inherit;
}
.maplibregl-ctrl button{
  min-width:29px!important;
  min-height:29px!important;
  padding:0!important;
}

@media(max-width:820px){
  body :where(.watch,.btn,.action,.type-action,.hero-action,.cta,.fav-airport,.more-btn,.clear,.tab,.recent-clear,.recent-chip,.select,.nexa-language-select),
  main button,
  main select,
  main input[type="button"],
  main input[type="submit"],
  .w button,
  .w select,
  .nexa-immersive-page :where(.btn,.select),
  .nexa-radar-page :where(.renderer-toggle,.terrain-toggle,.world-toggle,.filter-toggle,.radar-explore-link,.platform-menu-toggle,.menu-mobile){
    min-height:var(--sky-control-h-mobile)!important;
    font-size:13px!important;
  }
}

/* q2 - dynamic legacy-content normalization */
body :where(.platform-map-desc,.platform-map-title,.hero-quick-sub,.source,.section,.empty,.link,.vs,.terrain-label,.world-label,.status-note,.filter-result,.learn,.summary,.label,.recent-label,.local-note,.latency,.result-meta,.foot,.tools-note){font-size:12px!important;line-height:1.45!important}
.nx-quality-text{font-size:12px!important;line-height:1.45!important}
a.nx-quality-inline-control{font-size:12px!important;line-height:1.35!important;min-height:32px!important;display:inline-flex!important;align-items:center!important;padding-top:3px!important;padding-bottom:3px!important}
.nx-quality-button-control{font-size:12px!important;line-height:1.2!important;min-height:38px!important;min-width:36px!important;padding-top:7px!important;padding-bottom:7px!important}
.nexa-radar-page :where(.renderer-toggle,.terrain-toggle,.world-toggle,.filter-toggle){height:38px!important;min-height:38px!important;font-size:12px!important}
.nexa-radar-page .nx-language--radar .nx-language__trigger{height:42px!important;font-size:12px!important}
.maplibregl-ctrl button{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}
@media(max-width:820px){
  a.nx-quality-inline-control{min-height:36px!important;font-size:13px!important}
  .nx-quality-button-control{min-height:42px!important;font-size:13px!important}
  .nexa-radar-page :where(.renderer-toggle,.terrain-toggle,.world-toggle,.filter-toggle){height:42px!important;min-height:42px!important;font-size:13px!important}
}

/* q3 - finish remaining media credits, status text and dynamic inline targets */
body :where(.license a,.airport-photo__credit a,.activity-n,.health-card,.health-card a,.health-card span,.hero-quick-link small){font-size:12px!important;line-height:1.45!important}
.nexa-immersive-page .segments h3{font-size:12px!important;line-height:1.35!important}
.nexa-radar-page :where(.status,.menu-mobile a,.radar-quick-nav a,.radar-quick-nav b){font-size:12px!important;line-height:1.35!important}
a.nx-quality-inline-control{min-height:36px!important}
@media(max-width:820px){a.nx-quality-inline-control{min-height:40px!important}}

/* q4 - final target sizing and Radar mobile readability */
a.nx-quality-inline-control{min-width:36px!important}
.maplibregl-ctrl-attrib a{font-size:11.5px!important;min-height:24px!important;display:inline-flex!important;align-items:center!important}
.nexa-radar-page .mobile-nav a{font-size:12px!important;min-height:36px!important;display:flex!important;align-items:center!important;justify-content:center!important}
.nexa-radar-page :where(.renderer-toggle,.terrain-toggle,.world-toggle,.filter-toggle) *{font-size:12px!important;line-height:1.2!important}
.nexa-radar-page .status{font-size:12px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;max-width:none!important;line-height:1.35!important}
@media(max-width:820px){
  a.nx-quality-inline-control{min-width:40px!important}
  .nexa-radar-page .mobile-nav a{font-size:13px!important;min-height:40px!important}
  .nexa-radar-page :where(.renderer-toggle,.terrain-toggle,.world-toggle,.filter-toggle) *{font-size:13px!important}
}

/* q5 - semantic H1 keeps the previous visual title geometry */
h1.title{margin:0}

/* q6 - normalize Radar control font shorthand without enlarging map attribution chrome */
.nexa-radar-page button.renderer-toggle,
.nexa-radar-page button.terrain-toggle,
.nexa-radar-page button.world-toggle,
.nexa-radar-page button.filter-toggle{font:800 12px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}
@media(max-width:820px){
  .nexa-radar-page button.renderer-toggle,
  .nexa-radar-page button.terrain-toggle,
  .nexa-radar-page button.world-toggle,
  .nexa-radar-page button.filter-toggle{font-size:13px!important}
}

/* q7 - final readable map attribution */
.maplibregl-ctrl-attrib a{font-size:12px!important}

/* q8 - Journey replay target must be correct before dynamic quality pass */
.nexa-immersive-page .seg a{display:inline-flex!important;align-items:center!important;min-height:36px!important;min-width:36px!important;font-size:12px!important;line-height:1.35!important;padding:3px 0!important}
@media(max-width:820px){.nexa-immersive-page .seg a{min-height:40px!important;font-size:13px!important}}

/* q9 - multilingual mobile resilience for long translations */
@media(max-width:820px){
  /* Long single words and translated titles must never widen the document. */
  main :where(h1,h2,h3,.title,.section,.section-sub,.sub,.eyebrow,.source-chip,.badge,.pill,.label){
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:normal;
  }

  /* Old flex/grid page headers were sized from intrinsic translated content. */
  main :where(.head,.section-head,.bar,.tools,.layout,.grid,.summary,.overview,.target-summary,.target-grid){
    min-width:0;
    max-width:100%;
  }
  main :where(.head,.section-head){flex-wrap:wrap}
  main .head>*{min-width:0;max-width:100%}
  main .head>div:first-child{flex:1 1 100%;width:100%;min-width:0}
  main :where(.layout,.grid,.summary,.overview,.target-summary,.target-grid)>*{min-width:0;max-width:100%}
  main .bar>*{min-width:0;max-width:100%}

  /* Labels/chips may wrap instead of imposing their min-content width. */
  main :where(.source-chip,.count,.badge,.pill,.local-toggle,.unseen-toggle,.tools-note){
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  main :where(.section-head,.local-toggle,.unseen-toggle)>*{min-width:0}

  /* Cards must obey their grid track even with very long localized copy. */
  main :where(.card,.panel,.hero,.metric,.target-card){
    min-width:0;
    max-width:100%;
  }

  /* Tables scroll inside their own content area instead of widening the page. */
  main :where(.table,.tablewrap,.table-wrap,.table-wrapper){max-width:100%;overflow-x:auto}
}

/* q10 - resilient Search query/result wrapping at very narrow widths */
@media(max-width:820px){
  #result-head{min-width:0;max-width:100%;flex-wrap:wrap}
  #result-head>*{min-width:0;max-width:100%}
  #result-title,#result-meta{overflow-wrap:anywhere;word-break:break-word}
  #recent-wrap,#recent{min-width:0;max-width:100%;overflow-wrap:anywhere}
  #recent button,.recent-chip{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
  #q{min-width:0;max-width:100%}
}

/* q10 - ultra-narrow multilingual prose resilience */
@media(max-width:420px){
  main :where(p,li,dd,dt){
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:normal;
  }
}

/* q11 - force wrapping of long localized prose at ultra-narrow widths */
@media(max-width:420px){
  main :where(p,li,dd,dt){
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    min-width:0!important;
    max-width:100%!important;
  }
  main :where(ol,ul){min-width:0!important;max-width:100%!important}
}

/* q10 - do not squeeze translated action labels below their readable width */
@media(max-width:820px){
  main .bar :where(button,.btn,a[role="button"],input[type="button"],input[type="submit"]){
    flex:0 1 auto!important;
    min-width:max-content!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }
}

/* q12 - Explore stats must not use localized min-content width on ultra-narrow screens */
@media(max-width:420px){
  #stats.stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important;max-width:100%!important}
  #stats.stats>.stat{min-width:0!important;max-width:100%!important;padding-inline:10px!important}
  #stats.stats>.stat :where(.k,.v){min-width:0!important;max-width:100%!important;overflow-wrap:anywhere;word-break:normal}
}

/* q13 - Operators stats grid at ultra-narrow multilingual widths */
@media(max-width:360px){
  main.w #grid.grid .card .stats{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    min-width:0!important;
    max-width:100%!important;
  }
  main.w #grid.grid .card .stats>.fact{
    min-width:0!important;
    max-width:100%!important;
  }
  main.w #grid.grid .card .stats .k{
    min-width:0!important;
    max-width:100%!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
}

/* q14 - Operators stats grid remains two-column through narrow phone widths */
@media(max-width:420px){
  main.w #grid.grid .card .stats{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* q15 - semantic hidden guard across legacy page CSS */
[hidden]{display:none!important}


/* q16 - localized recovery actions for broken/deep-link terminal states */
.nx-edge-recovery{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px;max-width:100%}
.nx-edge-recovery a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;min-width:96px;padding:8px 13px;border-radius:10px;text-decoration:none;font-size:12px;font-weight:760;line-height:1.2;white-space:normal;text-align:center}
.nx-edge-recovery__primary{border:1px solid rgba(139,188,255,.28);background:rgba(139,188,255,.12);color:#e8f2ff}
.nx-edge-recovery__secondary{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.045);color:#dce8f6}
.nx-edge-recovery a:hover{border-color:rgba(139,188,255,.46);background:rgba(139,188,255,.16)}
@media(max-width:820px){.nx-edge-recovery{width:100%}.nx-edge-recovery a{min-height:42px;flex:1 1 132px;font-size:13px}}


/* q17 - short-height landscape resilience for Radar and immersive playback */
@media(max-height:520px){
  .nexa-immersive-page .panel.top{
    max-height:calc(100dvh - var(--nx-shell-h) - 176px)!important;
    min-height:0!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  .nexa-immersive-page .details{
    max-height:calc(100dvh - var(--nx-shell-h) - 176px)!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  .nexa-immersive-page .profile{display:none!important}
}
@media(max-height:520px) and (min-width:761px){
  .nexa-immersive-page .panel.top{
    width:min(500px,calc(100vw - 330px))!important;
    min-width:0!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }
}
@media(max-height:360px) and (max-width:700px){
  .nexa-radar-page .brand .status,
  .nexa-radar-page .brand .livery-legend{display:none!important}
}

/* q18 - mobile form readability and iOS focus-zoom guard */
@media(max-width:820px){
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  select,
  textarea{
    font-size:16px!important;
  }
}

/* q19 - select-specific mobile focus-zoom guard; overrides legacy .select/.sel rules */
@media(max-width:820px){
  body select,
  body select[class]{
    font:16px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  }
}
