* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0A0E17; }
body { font-family: 'Public Sans', system-ui, sans-serif; color: #F4F6FA; }
h1, h2, h3 { font-family: 'Space Grotesk', system-ui, sans-serif; margin: 0; }
a { color: inherit; text-decoration: none; }
a.link:hover { color: #3B82F6; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: 15px; color: #93A0B4; }
.nav-links a.lang { font-size: 13px; font-weight: 600; border: 1px solid #253248; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.nav-links a.lang:hover { color: #3B82F6; }
.nav-links a.nav-home { display: inline-flex; align-items: center; gap: 6px; color: #F4F6FA; border: 1px solid #253248; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-links a.nav-home:hover { border-color: #3B82F6; }
.nav-links a.nav-home svg { width: 16px; height: 16px; }
.page { padding-top: 56px; padding-bottom: 72px; min-height: 60vh; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1px; color: #3B82F6; text-transform: uppercase; }
.page h1 { font-size: 40px; line-height: 1.15; font-weight: 700; color: #FFF; margin-top: 12px; }
.lead { font-size: 16px; line-height: 1.6; color: #93A0B4; max-width: 560px; margin: 14px 0 0; }
.muted { color: #93A0B4; font-size: 14px; line-height: 1.55; }
.signin { max-width: 560px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 22px; }
.apple-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; align-self: flex-start; background: #FFF; color: #000; border: 0; border-radius: 10px; padding: 14px 26px; font-size: 16px; font-weight: 600; cursor: pointer; }
.apple-btn svg { width: 18px; height: 18px; }
.signin-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.signin-buttons .apple-btn { align-self: auto; min-width: 260px; }
.google-btn { border: 1px solid #DADCE0; }
.tabs { display: flex; gap: 6px; margin-top: 28px; border-bottom: 1px solid #1A2338; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; padding: 12px 14px; font-size: 15px; font-weight: 600; color: #93A0B4; border-bottom: 2px solid transparent; }
.tabs a:hover { color: #F4F6FA; }
.tabs a[aria-current="page"] { color: #FFF; border-bottom-color: #3B82F6; }
.view { padding-top: 28px; display: flex; flex-direction: column; gap: 22px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.view-head h2 { font-size: 26px; font-weight: 700; color: #FFF; }
.btn { font-size: 14.5px; font-weight: 600; color: #F4F6FA; background: transparent; border: 1px solid #253248; padding: 10px 18px; border-radius: 10px; cursor: pointer; }
.btn:hover { border-color: #3B82F6; }
.btn.solid { color: #0A0E17; background: #F4F6FA; border-color: #F4F6FA; }
.btn.danger { color: #F87171; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat, .card { background: #12192A; border: 1px solid #253248; border-radius: 16px; padding: 20px; min-width: 0; }
.stat span { display: block; font-size: 13px; color: #93A0B4; }
.stat b { display: block; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 24px; font-weight: 600; color: #FFF; margin-top: 8px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid #253248; border-radius: 16px; background: #12192A; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; font-size: 14.5px; border-bottom: 1px solid #1A2338; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: #93A0B4; font-weight: 600; font-size: 13px; }
th button { all: unset; cursor: pointer; }
th button:hover, th button:focus-visible { color: #3B82F6; }
td { color: #C7D0DE; }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: #1A2338; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #1A2338; color: #F4F6FA; }
.tag.ok { background: #12351f; color: #7be0a0; }
.state { padding: 36px 20px; text-align: center; color: #93A0B4; font-size: 15px; line-height: 1.6; background: #12192A; border: 1px dashed #253248; border-radius: 16px; }
.state .btn { margin-top: 14px; }
.error { color: #F87171; }
.note { background: #12192A; border: 1px solid #253248; border-left: 4px solid #F59E0B; border-radius: 12px; padding: 14px 18px; font-size: 14px; line-height: 1.55; color: #93A0B4; }
.note b { color: #F4F6FA; }
.map { height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid #253248; background: #EEF1F4; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib a { color: #0A0E17; }
.detail { display: flex; flex-direction: column; gap: 16px; }
.profile svg { width: 100%; height: 160px; display: block; }
.profile .line { fill: none; stroke: #3B82F6; stroke-width: 2; vector-effect: non-scaling-stroke; }
.profile .area { fill: rgba(59,130,246,.15); }
.profile-axis { display: flex; justify-content: space-between; font-size: 12.5px; color: #93A0B4; margin-top: 8px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 8px; background: #12192A; border: 1px solid #253248; border-radius: 16px; padding: 20px; min-width: 0; }
.plan-card:hover, .plan-card:focus-visible { border-color: #3B82F6; }
.plan-card h3 { font-size: 17px; font-weight: 600; color: #FFF; overflow-wrap: anywhere; }
.plan-card p { margin: 0; font-size: 14px; color: #93A0B4; overflow-wrap: anywhere; }
.editor { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.editor .map { height: 560px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #93A0B4; }
input[type=text], input[type=search], input[type=date], input[type=time], textarea { width: 100%; min-width: 0; background: #0A0E17; color: #F4F6FA; border: 1px solid #253248; border-radius: 10px; padding: 11px 13px; font-size: 16px; }
textarea { resize: vertical; font: inherit; font-size: 16px; line-height: 1.5; }
input[type=date], input[type=time] { color-scheme: dark; }
input[type=text]:focus, input[type=search]:focus, input[type=date]:focus, input[type=time]:focus, textarea:focus { outline: 2px solid #3B82F6; outline-offset: -1px; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.wps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wp { display: flex; align-items: center; gap: 8px; background: #12192A; border: 1px solid #253248; border-radius: 10px; padding: 8px 10px; }
.wp .main { flex: 1; min-width: 0; }
.wp .main input { padding: 5px 8px; font-size: 16px; }
.wp .name { font-weight: 600; color: #FFF; font-size: 15px; overflow-wrap: anywhere; }
.wp small { display: block; color: #93A0B4; font-size: 12.5px; margin-top: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.status { font-size: 14px; color: #93A0B4; }
.status.ok { color: #7be0a0; }
.status.bad { color: #F87171; }
.footer { padding-top: 32px; padding-bottom: 56px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #1A2338; flex-wrap: wrap; gap: 12px; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left img { width: 22px; height: 22px; border-radius: 6px; }
.footer-left span { font-size: 13px; color: #93A0B4; }
.footer-right { font-size: 13px; color: #5A6578; }

/* Account header: compact, so the planner map gets the room. */
.account-head .eyebrow { display: block; }
.account-head h1 { font-size: 30px; margin-top: 6px; }
#app .tabs { margin-top: 18px; }
#app.wide { max-width: 1680px; padding-top: 32px; }
.small { font-size: 13px; }
.muted.small { font-size: 13px; line-height: 1.5; }

/* Planner: route panel beside a large map. */
.planner { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: 20px; align-items: start; }
.planner .panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; max-height: calc(100vh - 230px); min-height: 520px; overflow-y: auto; padding-right: 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { font-size: 22px; font-weight: 700; color: #FFF; }
.panel-sub { font-size: 15px; font-weight: 600; color: #FFF; margin-top: 8px; padding-top: 14px; border-top: 1px solid #1A2338; }
.saved { display: flex; flex-direction: column; gap: 8px; }
.saved-plan { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid #253248; border-radius: 10px; background: #12192A; min-width: 0; }
.saved-plan:hover, .saved-plan:focus-visible { border-color: #3B82F6; }
.saved-plan.current { border-color: #D9468F; }
.saved-plan b { color: #FFF; font-size: 14.5px; overflow-wrap: anywhere; }
.saved-plan span { color: #93A0B4; font-size: 12.5px; overflow-wrap: anywhere; }
.map-wrap { position: relative; min-width: 0; }
.planner .planner-map { height: calc(100vh - 230px); min-height: 520px; }
.chart-switch { position: absolute; top: 12px; left: 12px; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(10,14,23,.92); border: 1px solid #253248; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.chart-switch button { font: inherit; font-size: 14px; font-weight: 600; color: #C7D0DE; background: transparent; border: 0; border-radius: 9px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.chart-switch button:hover { color: #FFF; }
.chart-switch button[aria-pressed="true"] { background: #3B82F6; color: #FFF; }
.map-tools { position: absolute; top: 12px; right: 52px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.map-btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; color: #F4F6FA; background: rgba(10,14,23,.92); border: 1px solid #253248; border-radius: 10px; padding: 8px 12px; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.map-btn:hover, .map-btn[aria-expanded="true"] { border-color: #3B82F6; }
.map-btn svg { width: 18px; height: 18px; }
.layer-panel { width: 300px; max-width: calc(100vw - 48px); background: #12192A; border: 1px solid #253248; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.layer-panel[hidden] { display: none; }
.layer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.layer-head b { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 16px; color: #FFF; }
.icon-btn { font: inherit; font-size: 22px; line-height: 1; color: #93A0B4; background: none; border: 0; cursor: pointer; padding: 2px 6px; }
.icon-btn:hover { color: #FFF; }
.layer-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #1A2338; cursor: pointer; }
.layer-row span { display: flex; flex-direction: column; gap: 2px; }
.layer-row b { color: #F4F6FA; font-size: 14px; }
.layer-row small { color: #93A0B4; font-size: 12px; font-weight: 400; }
.layer-row.pending { opacity: .55; cursor: default; }
.layer-panel .muted.small { margin: 8px 0 0; font-size: 12px; }
.switch { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 40px; height: 24px; border-radius: 999px; background: #253248; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #F4F6FA; transition: transform .15s; }
.switch:checked { background: #3B82F6; }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid #3B82F6; outline-offset: 2px; }
.switch:disabled { cursor: default; }

/* Aircraft and logbook forms. */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-wide { grid-column: 1 / -1; }
.combo { display: block; }
.hint { font-weight: 400; color: #93A0B4; }
td.edit-cell { color: #3B82F6; font-weight: 600; font-size: 13.5px; text-align: right; }


/* Route search with suggestions. */
.search { position: relative; display: flex; flex-direction: column; gap: 6px; }
.search > label { font-size: 13px; font-weight: 600; color: #93A0B4; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin: 6px 0 0; padding: 6px; list-style: none; background: #12192A; border: 1px solid #253248; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); max-height: 360px; overflow-y: auto; }
.search-results[hidden] { display: none; }
.search-results li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.search-results li b { color: #FFF; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.search-results li span { color: #93A0B4; font-size: 12.5px; }
.search-results li.active, .search-results li:hover { background: #1A2338; }

/* Map popups on the light map. */
.maplibregl-popup-content { color: #0F172A; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(15,23,42,.25); font-family: 'Public Sans', system-ui, sans-serif; }
.maplibregl-popup-close-button { font-size: 18px; color: #475569; padding: 2px 6px; }
.pop { display: flex; flex-direction: column; gap: 6px; padding-right: 10px; }
.pop > b { font-size: 14.5px; font-weight: 700; }
.pop-sub { font-size: 12.5px; color: #475569; }
.pop ul { margin: 2px 0; padding-left: 16px; font-size: 12.5px; color: #334155; line-height: 1.5; }
.pop ul.pop-spaces { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pop-spaces li { display: flex; flex-direction: column; }
.pop-spaces b { font-size: 13px; }
.pop-spaces span { color: #475569; }
.pop .btn.solid { align-self: flex-start; margin-top: 4px; color: #FFF; background: #1D4ED8; border-color: #1D4ED8; }
.layer-list { display: flex; flex-direction: column; max-height: min(60vh, 520px); overflow-y: auto; }
.source-box { margin-top: 8px; }
.source-box p { margin: 6px 0 0; font-size: 12px; line-height: 1.5; }

@media (max-width: 900px) {
  .page { padding-top: 40px; }
  .page h1 { font-size: 30px; }
  .nav-links a:not(.lang):not(.nav-home) { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .editor .map { height: 380px; order: -1; }
  .map { height: 320px; }
  .planner { grid-template-columns: 1fr; }
  .planner .map-wrap { order: -1; }
  .planner .planner-map { height: 62vh; min-height: 380px; }
  .planner .panel { max-height: none; min-height: 0; overflow: visible; padding-right: 0; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .account-head h1 { font-size: 24px; }
}
@media (max-width: 600px) {
  .map-tools { top: 60px; left: 12px; right: auto; align-items: flex-start; }
  .layer-panel { width: calc(100vw - 72px); }
  .layer-list { max-height: max(160px, calc(62vh - 190px)); }
  .chart-switch button { padding: 7px 11px; font-size: 13.5px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ===== Planner mode: the map fills the window, the plan and the profile float over it. ===== */
body.planner-mode { overflow: hidden; }
body.planner-mode .footer, body.planner-mode .account-head { display: none; }
body.planner-mode .nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; max-width: none; height: 56px; padding: 0 18px; background: #0A0E17; border-bottom: 1px solid #1A2338; }
body.planner-mode .nav .brand { font-size: 17px; }
body.planner-mode .nav .brand img { width: 32px; height: 32px; border-radius: 8px; }
body.planner-mode #app.wide { padding: 0; max-width: none; min-height: 0; }
body.planner-mode #app .tabs { position: fixed; top: 0; left: 170px; height: 56px; margin: 0; border: 0; z-index: 41; align-items: center; }
body.planner-mode #app .tabs a { padding: 8px 12px; }
body.planner-mode #view { padding: 0; }
body.planner-mode .planner { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; display: block; }
body.planner-mode .map-wrap { position: absolute; inset: 0; }
body.planner-mode .planner .planner-map { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; border-radius: 0; }

/* Floating route panel */
body.planner-mode .planner .panel { position: absolute; top: 12px; left: 12px; width: 370px; max-height: calc(100% - 24px - var(--prof-h) - 12px); min-height: 0; z-index: 6; padding: 14px 14px 16px; border-radius: 16px; background: rgba(10,14,23,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid #253248; box-shadow: 0 12px 32px rgba(0,0,0,.35); overflow-y: auto; gap: 12px; }
.panel-body { display: flex; flex-direction: column; gap: 12px; }
.panel.collapsed .panel-body { display: none; }
.collapse-btn { font-size: 16px; transition: transform .15s; }
.panel.collapsed .collapse-btn { transform: rotate(-90deg); }
.panel-head h2 { flex: 1; font-size: 19px; }
.panel-head { gap: 8px; }
.aircraft-field select { width: 100%; background: #0A0E17; color: #F4F6FA; border: 1px solid #253248; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; }
.trip { margin: 0; font-size: 13.5px; color: #93A0B4; line-height: 1.5; }
.trip b { color: #F4F6FA; }

/* Map overlays */
:root { --prof-h: 170px; }
.utc-clock { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgba(255,255,255,.95); color: #0F172A; border-radius: 12px; padding: 7px 14px; box-shadow: 0 4px 16px rgba(15,23,42,.18); font-family: 'Space Grotesk', system-ui, sans-serif; white-space: nowrap; }
.utc-clock b { font-size: 20px; font-weight: 700; }
.utc-clock span { font-size: 13px; color: #475569; }
body.planner-mode .chart-switch { left: auto; right: 12px; top: 12px; z-index: 5; }
body.planner-mode .map-tools { top: 62px; right: 12px; z-index: 7; }
.info-card { position: absolute; top: 112px; right: 12px; width: 320px; max-width: calc(100% - 24px); max-height: calc(100% - 136px - var(--prof-h)); overflow-y: auto; z-index: 6; background: #FFF; color: #0F172A; border-radius: 14px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(15,23,42,.3); }
.info-card[hidden] { display: none; }
.info-close { position: absolute; top: 6px; right: 6px; color: #475569; }
.info-close:hover { color: #0F172A; }
.profile-dock { position: absolute; left: 394px; right: 12px; bottom: 12px; height: var(--prof-h); z-index: 5; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: rgba(10,14,23,.92); border: 1px solid #253248; box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.prof-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; font-size: 13px; color: #93A0B4; }
.prof-head > b { color: #FFF; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 14px; }
.prof-warn { color: #FCA5A5; font-weight: 600; }
.prof-warn[hidden] { display: none; }
.alt-field { flex-direction: row; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; font-weight: 600; color: #93A0B4; }
.alt-field input.alt-input { width: 80px; padding: 5px 8px; font-size: 14px; }
.prof-body { flex: 1; min-height: 0; }
.prof-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
body.planner-mode .maplibregl-ctrl-bottom-right, body.planner-mode .maplibregl-ctrl-bottom-left { bottom: calc(var(--prof-h) + 18px); }
body.planner-mode .maplibregl-ctrl-bottom-left { left: 394px; }

@media (max-width: 1100px) {
  body.planner-mode #app .tabs { left: 150px; }
  body.planner-mode .nav .brand span { display: none; }
  body.planner-mode #app .tabs { left: 64px; }
}
@media (max-width: 900px) {
  :root { --prof-h: 160px; }
  .prof-stats { display: none; }
  .prof-head { gap: 4px 10px; padding: 6px 10px; }
  .prof-warn { font-size: 12px; }
  body.planner-mode #app .tabs { top: 56px; left: 0; right: 0; height: 44px; background: #0A0E17; border-bottom: 1px solid #1A2338; padding: 0 8px; }
  body.planner-mode .planner { top: 100px; }
  body.planner-mode .planner .panel { left: 8px; right: 8px; top: 8px; width: auto; max-height: calc(100% - 16px - var(--prof-h) - 60px); }
  body.planner-mode .chart-switch { top: auto; right: auto; left: 8px; bottom: calc(var(--prof-h) + 16px); }
  body.planner-mode .map-tools { top: auto; right: 8px; left: auto; bottom: calc(var(--prof-h) + 16px); align-items: flex-end; flex-direction: column-reverse; }
  .utc-clock { display: none; }
  .info-card { top: auto; right: 8px; left: 8px; width: auto; bottom: calc(var(--prof-h) + 64px); max-height: 45%; }
  .profile-dock { left: 0; right: 0; bottom: 0; border-radius: 14px 14px 0 0; }
  .alt-field { margin-left: 0; }
  body.planner-mode .maplibregl-ctrl-bottom-right { bottom: calc(var(--prof-h) + 64px); }
  body.planner-mode .maplibregl-ctrl-bottom-left { left: 0; bottom: calc(var(--prof-h) + 64px); }
}

/* Flight-plan form (Argentina) */
.fpl-btn { width: 100%; text-align: left; border-color: #3B82F6; }
.fpl-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(5,8,14,.6); display: flex; justify-content: center; align-items: flex-start; padding: 24px 16px; overflow-y: auto; }
.fpl-dialog { width: 100%; max-width: 820px; background: #12192A; border: 1px solid #253248; border-radius: 18px; padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.fpl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fpl-head h2 { font-size: 24px; color: #FFF; margin-top: 4px; }
.fpl-missing { font-size: 13.5px; color: #FBBF24; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
.fpl-missing .ok { color: #7be0a0; }
.fpl-section { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid #1A2338; }
.fpl-section h3 { font-size: 17px; color: #FFF; }
.fpl-section h4 { margin: 4px 0 0; font-size: 13px; color: #93A0B4; text-transform: uppercase; letter-spacing: .6px; }
.fpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fpl-grid.sub, .fpl-checks.sub { padding-left: 14px; border-left: 2px solid #253248; }
.fpl-wide { grid-column: 1 / -1; }
.fpl-dialog select, .fpl-dialog input[type=email] { width: 100%; background: #0A0E17; color: #F4F6FA; border: 1px solid #253248; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; }
.fpl-dialog input:disabled { opacity: .7; }
.fpl-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.fpl-checks[hidden], .fpl-grid[hidden] { display: none; }
label.fpl-check { flex-direction: row; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: #C7D0DE; cursor: pointer; }
.fpl-sig-wrap { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fpl-sig-label { font-size: 13px; font-weight: 600; color: #93A0B4; }
.fpl-sig { width: 100%; max-width: 480px; height: auto; aspect-ratio: 600 / 160; background: #FFF; border-radius: 10px; touch-action: none; cursor: crosshair; }
.fpl-message { margin: 0; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #C7D0DE; background: #0A0E17; border: 1px solid #253248; border-radius: 10px; padding: 12px; user-select: all; }
.fpl-actions { padding-top: 6px; }
@media (max-width: 700px) {
  .fpl-grid, .fpl-checks { grid-template-columns: 1fr 1fr; }
  .fpl-dialog { padding: 18px 16px 22px; }
}

/* The profile is docked to the bottom edge, full width, like a chart strip under the map. */
.profile-dock { left: 0; right: 0; bottom: 0; border-radius: 0; border: 0; border-top: 1px solid #253248; box-shadow: 0 -8px 24px rgba(0,0,0,.25); background: #0A0E17; }
.profile-dock.folded .prof-body { display: none; }
.prof-toggle { font-size: 16px; transition: transform .15s; padding: 0 4px; }
.profile-dock.folded .prof-toggle { transform: rotate(180deg); }
.prof-hint { font-size: 12px; color: #5A6578; }
.alt-field { margin-left: auto; }
@media (max-width: 1100px) { .prof-hint { display: none; } }

.base-switch { display: flex; gap: 2px; padding: 3px; margin-bottom: 8px; border-radius: 10px; background: #0A0E17; border: 1px solid #253248; }
.base-switch button { flex: 1; font: inherit; font-size: 13.5px; font-weight: 600; color: #C7D0DE; background: transparent; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.base-switch button[aria-pressed="true"] { background: #3B82F6; color: #FFF; }

/* ===== Compact plan panel ===== */
body.planner-mode .planner .panel { width: 340px; padding: 10px 12px 12px; gap: 8px; }
.panel-head { gap: 6px; }
.panel-head h2 { font-size: 16px; flex: 1; }
.tools { display: flex; gap: 2px; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: #C7D0DE; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.tool-btn svg { width: 18px; height: 18px; }
.tool-btn:hover { background: #1A2338; color: #FFF; }
.fpl-tool { border: 1px solid #3B82F6; color: #93C5FD; margin-left: 4px; }
.panel-body { gap: 8px; }
.panel-body label { font-size: 11.5px; gap: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel-body input[type=text], .panel-body input[type=search], .panel-body select, .route-text { padding: 7px 9px; font-size: 14px; border-radius: 8px; }
.aircraft-field select, .panel-body select { width: 100%; background: #0A0E17; color: #F4F6FA; border: 1px solid #253248; font: inherit; font-size: 14px; }
.route-text { width: 100%; resize: vertical; min-height: 40px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; letter-spacing: .3px; text-transform: uppercase; }
.panel .wps { gap: 0; }
.panel .wp { padding: 5px 6px 5px 8px; gap: 4px; border-radius: 8px; background: rgba(18,25,42,.9); }
.panel .wp .main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.panel .wp .name { font-size: 14px; font-weight: 700; color: #FFF; }
.panel .wp .main input { padding: 3px 6px; font-size: 14px; max-width: 120px; }
.panel .wp small { margin: 0; font-size: 11.5px; color: #93A0B4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #93A0B4; cursor: pointer; font-size: 13px; line-height: 1; }
.mini:hover:not(:disabled) { background: #1A2338; color: #FFF; }
.mini:disabled { opacity: .3; cursor: default; }
.mini.danger:hover { color: #F87171; }
.panel .leg { list-style: none; margin: 0 0 0 14px; padding: 3px 0 3px 12px; border-left: 2px solid #D9468F; font-size: 12px; font-weight: 600; color: #F9A8D4; font-variant-numeric: tabular-nums; }
.trip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 7px 8px; border-radius: 8px; background: #0A0E17; border: 1px solid #1A2338; }
.trip span { display: flex; flex-direction: column; gap: 1px; }
.trip small { font-size: 10.5px; font-weight: 600; color: #5A6578; text-transform: uppercase; letter-spacing: .5px; }
.trip b { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 15px; color: #FFF; font-variant-numeric: tabular-nums; }
.panel-foot { display: flex; flex-direction: column; gap: 4px; }
.panel-foot .muted.small { font-size: 11px; line-height: 1.4; color: #5A6578; }
.link-btn { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.link-btn.danger { color: #F87171; }
.link-btn[hidden] { display: none; }
.saved-pop { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; background: #0A0E17; border: 1px solid #253248; max-height: 260px; overflow-y: auto; }
.saved-pop[hidden] { display: none; }
.saved-title { font-size: 12px; color: #93A0B4; text-transform: uppercase; letter-spacing: .5px; }
.panel .status { font-size: 12.5px; }
.panel .status:empty { display: none; }
@media (max-width: 900px) { body.planner-mode .planner .panel { width: auto; } }

/* ---------- NOTAM and AIP supplements ---------- */
.map-btns { display: flex; gap: 8px; }
.notam-box { margin-top: 8px; padding-top: 10px; border-top: 1px solid #253248; font-size: 12px; color: #93A0B4; }
.notam-box > b { color: #FFF; font-size: 13px; }
.notam-box ul { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.notam-box li span { color: #CBD5E1; }
.notam-box li.bad { color: #FCA5A5; }
.notam-legal { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: #93A0B4; }
.info-card .notam-legal { color: #64748B; }
.supp-panel { width: 380px; }
.supp-search { font: inherit; font-size: 14px; color: #F4F6FA; background: #0A0E17; border: 1px solid #253248; border-radius: 8px; padding: 7px 10px; margin: 2px 0 4px; }
.supp-search:focus { outline: none; border-color: #3B82F6; }
.supp-meta { margin: 0 0 4px !important; }
.supp-list { display: flex; flex-direction: column; gap: 2px; max-height: min(55vh, 480px); overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.supp-group { margin: 10px 0 2px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #93A0B4; }
.supp-item { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; border-radius: 8px; color: #E2E8F0; text-decoration: none; }
a.supp-item:hover { background: #1B2538; }
.supp-item b { font-size: 13px; color: #FFF; }
.supp-item span { font-size: 12.5px; line-height: 1.4; }
.supp-item small { font-size: 11.5px; color: #93A0B4; }
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pop-actions .btn.solid { margin-top: 0; }
.pop-actions .btn:not(.solid) { color: #1E293B; background: #F1F5F9; border: 1px solid #CBD5E1; }
.pop-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748B; }
.pop-notams { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid #E2E8F0; }
.notam-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; font: inherit; padding: 7px 10px; border-radius: 8px; cursor: pointer; background: #FEF2F2; border: 1px solid #FCA5A5; color: #0F172A; }
.notam-pick b { font-size: 12.5px; color: #B91C1C; }
.notam-pick span { font-size: 12px; color: #475569; }
.notam-pick.adv { background: #FFFBEB; border-color: #FCD34D; }
.notam-pick.adv b { color: #B45309; }
.notam-pick:hover { filter: brightness(.97); }
.notam-pop .n-back { color: #1D4ED8; }
.n-title { font-size: 14.5px; font-weight: 800; color: #DC2626; }
.n-title.adv { color: #D97706; }
.n-badge { align-self: flex-start; font-size: 12px; font-weight: 700; color: #92400E; background: #FEF3C7; border-radius: 6px; padding: 3px 8px; }
.n-rows { display: flex; flex-direction: column; gap: 3px; margin: 2px 0; }
.n-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.n-row span { color: #64748B; font-weight: 600; }
.n-row b { text-align: right; font-variant-numeric: tabular-nums; }
.n-text { margin: 2px 0; padding: 8px 10px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; font: 11.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; color: #1E293B; max-height: 220px; overflow-y: auto; }
.n-src { font-size: 11.5px; color: #475569; }
@media (max-width: 900px) {
  .supp-panel { width: calc(100vw - 72px); }
  .supp-list { max-height: max(160px, calc(62vh - 230px)); }
}
.pop-actions .btn.notam-btn { color: #B91C1C; background: #FEF2F2; border-color: #FCA5A5; }

/* ---------- route alerts and the Argentine FPL button ---------- */
.alerts { display: flex; flex-direction: column; gap: 6px; }
.alerts:empty { display: none; }
.alerts-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.alerts-head span { font-size: 11.5px; color: #93A0B4; }
.alerts-head.ok b { color: #4ADE80; }
.alerts-head.warn b { color: #FBBF24; }
.alerts-head.danger b { color: #F87171; }
.alert-item { display: flex; flex-direction: column; gap: 1px; text-align: left; font: inherit; padding: 7px 10px; border-radius: 8px; cursor: pointer; border: 1px solid #253248; border-left-width: 4px; background: #0F1626; color: #E2E8F0; }
.alert-item:hover { background: #162036; }
.alert-item b { font-size: 12.5px; color: #FFF; }
.alert-item span { font-size: 12px; }
.alert-item small { font-size: 11px; color: #93A0B4; }
.alert-item .alert-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.alert-item.danger { border-left-color: #EF4444; }
.alert-item.danger .alert-kind { color: #F87171; }
.alert-item.warn { border-left-color: #F59E0B; }
.alert-item.warn .alert-kind { color: #FBBF24; }
.alert-item.info { border-left-color: #3B82F6; }
.alert-item.info .alert-kind { color: #93C5FD; }
.alert-item.clear { border-left-color: #334155; opacity: .8; }
.alert-item.clear .alert-kind { color: #94A3B8; }
.alerts-note { margin: 0; font-size: 11px; line-height: 1.4; color: #7C8AA0; }
.fpl-row { display: flex; flex-direction: column; gap: 4px; }
.fpl-row[hidden] { display: none; }
.fpl-row small { font-size: 11px; color: #93A0B4; }
.fpl-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font: inherit; font-size: 13.5px; font-weight: 800; letter-spacing: .03em; color: #FFF; background: linear-gradient(90deg, #4A90D9, #74ACDF); border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(74,144,217,.35); }
.fpl-btn:hover { filter: brightness(1.07); }
.fpl-btn svg { width: 18px; height: 18px; }
.fpl-btn:disabled { background: #1E293B; color: #64748B; box-shadow: none; cursor: not-allowed; filter: none; }

/* Guest planner */
.guest-cta { display: flex; flex-direction: column; gap: 3px; padding: 16px 20px; border-radius: 14px; background: linear-gradient(135deg, #1D4ED8, #7C3AED); color: #FFF; text-decoration: none; }
.guest-cta b { font-size: 17px; }
.guest-cta span { font-size: 13.5px; color: rgba(255,255,255,.85); }
.guest-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.guest-bar .btn { flex: 1 1 140px; }
.guest-bar .btn.solid { color: #FFF; background: #1D4ED8; border-color: #1D4ED8; }
.unit-input { display: flex; align-items: center; gap: 6px; }
.unit-input input { flex: 1 1 auto; min-width: 0; }
.unit-input small { color: #5A6578; font-size: 12px; white-space: nowrap; }
@media (max-width: 900px) {
  body.planner-mode.guest-mode .planner { top: 56px; }
}
@media (max-width: 600px) {
  /* Room for the chart switch and the map buttons side by side on a phone: the buttons keep only their icon. */
  body.planner-mode .map-btn span { display: none; }
  body.planner-mode .map-btn { padding-left: 11px; padding-right: 11px; }
}

/* Sign-in pitch and the planner's sign-in or guest choice */
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.perks li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #12192A; border: 1px solid #253248; }
.perks .perk-icon { font-size: 20px; line-height: 1.2; flex: 0 0 auto; width: 26px; text-align: center; }
.perks b { display: block; color: #F4F6FA; font-size: 15px; }
.perks span:not(.perk-icon) { display: block; color: #93A0B4; font-size: 13.5px; margin-top: 2px; line-height: 1.4; }
.or-line { display: flex; align-items: center; gap: 12px; color: #5A6578; font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: #253248; }
.guest-link { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 14px 18px; border-radius: 14px; background: transparent; border: 1px solid #33415C; color: #F4F6FA; cursor: pointer; font: inherit; }
.guest-link:hover { border-color: #5A6E96; background: #12192A; }
.guest-link b { font-size: 15.5px; }
.guest-link span { font-size: 13px; color: #93A0B4; }
.plan-choice .signin-buttons .apple-btn { flex: 1 1 240px; min-width: 0; }
.signin.plan-choice { max-width: 720px; gap: 18px; }
@media (min-width: 640px) { .plan-choice .perks { grid-template-columns: 1fr 1fr; } }
.plan-choice .perks li { padding: 12px 14px; }
@media (max-width: 600px) { .nav-links a.nav-home span { display: none; } .nav-links a.nav-home { padding: 6px 9px; } }
.nav-links a[data-account-link] { color: #FFFFFF; background: #3B82F6; border-color: #3B82F6; border-radius: 999px; padding: 6px 14px; }
.nav-links a[data-account-link]:hover { background: #2563EB; color: #FFFFFF; }

/* Aircraft details (folded sections) and the fuel / weight-and-balance summary of the plan. */
.ac-sec { border: 1px solid #1A2338; border-radius: 12px; padding: 0 14px; background: #0D1322; }
.ac-sec > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: #F4F6FA; list-style-position: inside; }
.ac-sec[open] > summary { border-bottom: 1px solid #1A2338; margin-bottom: 14px; }
.ac-sec[open] { padding-bottom: 16px; }
.ac-units { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-sub { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: #93A0B4; }
.ac-list { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ac-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; align-items: center; width: 100%; }
.ac-row.two { grid-template-columns: 1fr 1fr auto; max-width: 520px; }
.ac-head span { font-size: 12px; color: #5A6578; }
.fuel-box { display: flex; flex-direction: column; gap: 3px; }
.fuel-box:empty { display: none; }
.fuel-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #93A0B4; }
.fuel-row b { color: #F4F6FA; font-weight: 600; font-variant-numeric: tabular-nums; }
.fuel-row.strong span, .fuel-row.strong b { color: #FFF; font-weight: 700; }
.fuel-note { margin: 0; font-size: 11.5px; color: #7C8AA0; }
.fuel-ok { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: #4ADE80; }
.fuel-bad { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: #F87171; }
.fuel-warn { margin: 2px 0 0; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; color: #FB923C; text-transform: uppercase; }
.fuel-box .btn.small { align-self: flex-start; margin-top: 4px; }
.wb-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: #12192A; color: #F4F6FA; border: 1px solid #253248; border-radius: 16px; padding: 18px 20px; }
.wb-dialog::backdrop { background: rgba(0,0,0,.55); }
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wb-head h3 { margin: 0; font-size: 17px; }
.wb-in { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 14px; }
.wb-in label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #93A0B4; }
.wb-in input { background: #0A0E17; color: #F4F6FA; border: 1px solid #253248; border-radius: 8px; padding: 8px 10px; font: inherit; }
.wb-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 6px; }
.wb-table th, .wb-table td { padding: 6px 4px; border-bottom: 1px solid #1A2338; text-align: left; font-variant-numeric: tabular-nums; }
.wb-table td.ok { color: #4ADE80; } .wb-table td.bad { color: #F87171; }
.wb-chart { display: block; width: 100%; height: auto; margin-top: 10px; background: #0A0E17; border-radius: 10px; }
@media (max-width: 560px) { .ac-row { grid-template-columns: 1fr 1fr; } .ac-units, .wb-in { grid-template-columns: 1fr; } }
.form select { width: 100%; min-width: 0; background: #0A0E17; color: #F4F6FA; border: 1px solid #253248; border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 16px; }

/* ---------- flight: departure, altitude, summary with wind, Flights ---------- */
.flight-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chip-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 9px; border-radius: 8px; background: #0A0E17; border: 1px solid #253248; color: #F4F6FA; font: inherit; cursor: pointer; text-align: left; }
.chip-btn:hover { border-color: #3B82F6; }
.chip-btn small { font-size: 10.5px; font-weight: 600; color: #5A6578; text-transform: uppercase; letter-spacing: .5px; }
.chip-btn b { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 14px; font-variant-numeric: tabular-nums; }
.trip { grid-template-columns: repeat(5, 1fr); }
.trip b { font-size: 14px; white-space: nowrap; }
.trip .head b { color: #F87171; }
.trip .tail b { color: #4ADE80; }
.wind-line { margin: -2px 0 0; font-size: 11.5px; color: #93A0B4; }
.wind-line:empty { display: none; }
.doc-row { display: flex; gap: 6px; }
.doc-row .btn { flex: 1; font-weight: 700; letter-spacing: .4px; }
.send-row { display: flex; flex-direction: column; gap: 4px; }
.send-btn { font-weight: 800; letter-spacing: .4px; }
.send-btn.draft { color: #1A1206; background: #F59E0B; border-color: #F59E0B; }
.draft-note { margin: 0; font-size: 11px; font-weight: 700; color: #F59E0B; letter-spacing: .3px; }
.dep-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #93A0B4; }
.dep-field input { padding: 9px 10px; font: inherit; font-size: 16px; color: #F4F6FA; background: #0A0E17; border: 1px solid #253248; border-radius: 8px; color-scheme: dark; }
.dep-utc { display: flex; justify-content: space-between; margin: 12px 0 4px; font-size: 14px; color: #93A0B4; }
.dep-utc b { color: #F4F6FA; font-family: 'Space Grotesk', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.dep-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.seg { display: flex; border: 1px solid #253248; border-radius: 9px; overflow: hidden; }
.seg button { flex: 1; padding: 7px 4px; font: inherit; font-size: 12px; font-weight: 700; color: #93A0B4; background: transparent; border: 0; cursor: pointer; }
.seg button[aria-pressed="true"] { color: #0A0E17; background: #F4F6FA; }
.alt-explain { margin: 8px 0; }
.alt-list { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; border: 1px solid #1A2338; border-radius: 10px; }
.alt-row { display: grid; grid-template-columns: 1.3fr 1.3fr .7fr .7fr; gap: 6px; align-items: center; padding: 8px 10px; font: inherit; font-size: 13px; color: #F4F6FA; background: transparent; border: 0; border-top: 1px solid #1A2338; text-align: right; cursor: pointer; font-variant-numeric: tabular-nums; }
.alt-row > span:first-child { text-align: left; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.alt-row:hover { background: #172036; }
.alt-row.current { background: rgba(59,130,246,.16); }
.alt-headrow { cursor: default; border-top: 0; font-size: 10px; font-weight: 700; color: #5A6578; letter-spacing: .4px; position: sticky; top: 0; background: #12192A; }
.alt-headrow:hover { background: #12192A; }
.alt-row .head { color: #F87171; font-weight: 700; }
.alt-row .tail { color: #4ADE80; font-weight: 700; }
.alt-row .muted { color: #5A6578; }
.fastest { font-style: normal; font-size: 9.5px; font-weight: 800; color: #0A0E17; background: #4ADE80; padding: 1px 6px; border-radius: 99px; }
.alt-typed { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.alt-typed label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #93A0B4; }
.alt-typed input { width: 110px; padding: 7px 9px; font: inherit; color: #F4F6FA; background: #0A0E17; border: 1px solid #253248; border-radius: 8px; }

/* ---------- navigation log and briefing sheets ---------- */
.doc-dialog { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: #1F2937; display: flex; flex-direction: column; }
.doc-dialog:not([open]) { display: none; }
.doc-dialog::backdrop { background: rgba(0,0,0,.6); }
.doc-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #12192A; color: #F4F6FA; border-bottom: 1px solid #253248; }
.doc-bar b { flex: 1; letter-spacing: .5px; }
.sheet-holder { flex: 1; overflow: auto; padding: 12px 8px 40px; }
.sheet { margin: 0 auto; background: #FFF; color: #111; font-family: 'Public Sans', system-ui, sans-serif; padding: 18px; box-shadow: 0 4px 24px rgba(0,0,0,.35); }
.sheet small { color: #6B7280; }
/* The site's own table style (dark, 14.5 px, left-aligned) must not reach the white sheets. */
.sheet th, .sheet td { color: #111; font-size: inherit; font-weight: inherit; padding: 4px 3px; text-align: center; white-space: normal; border-bottom: 0; }
.sheet b, .sheet strong { color: #111; }
.nl-sheet { width: 790px; padding: 20px; box-sizing: border-box; }
.bf-sheet { width: 700px; }
.sheet h2 { margin: 0; font-size: 17px; font-weight: 800; color: #111; }
.nl-top { display: flex; justify-content: space-between; gap: 16px; }
.nl-top p { margin: 2px 0 0; font-size: 11px; font-weight: 600; color: #6B7280; }
.nl-right { text-align: right; }
.nl-rule { height: 1.5px; background: #111; margin: 8px 0; }
.nl-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 8px; border-bottom: 1px solid #D1D5DB; }
.nl-box b { display: block; font-size: 10px; font-weight: 800; }
.nl-box span { font-size: 11px; font-weight: 600; color: #6B7280; }
.nl-route { margin: 8px 0; font-size: 11px; }
.nl-route b { display: block; font-size: 10px; font-weight: 800; }
.nl-route span { font-weight: 600; }
.sheet table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.nl-airports { margin-bottom: 10px; border: 1px solid #D1D5DB; font-size: 10px; text-align: center; }
.nl-airports th, .nl-airports td { border-top: 1px solid #D1D5DB; padding: 5px 4px; font-weight: 600; }
.nl-airports thead th { background: #F1F3F5; font-weight: 800; }
.nl-airports tbody th { font-weight: 800; width: 70px; }
.nl-apt b { display: block; font-size: 11px; }
.nl-table { border: 1px solid #D1D5DB; font-size: 11px; text-align: center; table-layout: fixed; }
.nl-table td.nl-one { font-size: 11px; white-space: nowrap; }
.nl-table td.nl-bold { font-weight: 800; }
.nl-table td span, .nl-table td small { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.nl-table td.nl-vor span { font-size: 10px; font-weight: 800; }
.nl-table td.nl-vor small { font-size: 9px; }
.nl-sun-block { margin-bottom: 10px; }
.nl-sun { border: 1px solid #D1D5DB; font-size: 10px; text-align: center; }
.nl-sun th, .nl-sun td { border-top: 1px solid #D1D5DB; padding: 4px; font-weight: 600; }
.nl-sun thead th { background: #F1F3F5; font-weight: 800; }
.nl-sun tbody th { font-weight: 800; width: 70px; }
.nl-sun td b { display: block; font-size: 11px; font-weight: 800; }
.nl-sun td small { display: block; font-size: 9px; font-weight: 600; }
.nl-sun-warn { margin: 5px 0 0; font-size: 10px; font-weight: 800; }
.nl-sun-note { margin: 3px 0 0; font-size: 8px; font-weight: 600; color: #6B7280; }
.nl-table thead { display: table-header-group; }
.nl-table tr { break-inside: avoid; page-break-inside: avoid; }
.nl-table thead th { background: #F1F3F5; border-bottom: 1.5px solid #111; padding: 4px 3px; font-size: 9px; font-weight: 800; }
.nl-table th span, .nl-table td span { display: block; }
.nl-table th small { display: block; font-size: 8px; font-weight: 600; }
.nl-table td { border-top: 1px solid #D1D5DB; padding: 4px 3px; font-weight: 600; height: 34px; }
.nl-table td small { display: block; font-size: 10px; font-weight: 600; color: #6B7280; }
.nl-table .nl-wp { text-align: left; padding-left: 6px; }
.nl-table td.nl-wp b { display: block; font-size: 11px; font-weight: 800; }
.nl-table td.nl-wp small { font-size: 8px; }
.nl-table .nl-computed td { background: rgba(241,243,245,.8); }
.nl-table .nl-computed td.nl-wp b { font-style: italic; }
.nl-blank i { display: block; height: 1px; margin: 9px 7px 0; background: #D1D5DB; }
.nl-table tfoot td { background: #F1F3F5; border-top: 1.5px solid #111; font-weight: 800; height: 28px; }
.nl-table tfoot td:first-child { text-align: left; padding-left: 6px; }
.nl-foot { margin-top: 12px; break-inside: avoid; page-break-inside: avoid; }
.nl-fields { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding-top: 6px; }
.nl-fields b { font-size: 9px; font-weight: 800; }
.nl-fields i { display: block; height: 1px; background: #D1D5DB; margin-top: 12px; }
.nl-fuel { margin: 10px 0 4px; font-size: 10px; font-weight: 600; }
.nl-note { margin: 6px 0 0; font-size: 8px; font-weight: 800; color: #6B7280; }
.bf-head p { margin: 3px 0; }
.bf-faint { margin: 4px 0; font-size: 9.5px; font-weight: 600; color: #6B7280; }
.bf-warn { margin: 4px 0; font-size: 10px; font-weight: 800; color: #C2410C; }
.bf-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.bf-facts > div { display: flex; flex-direction: column; min-width: 90px; }
.bf-facts small { font-size: 8px; font-weight: 800; }
.bf-facts b { font-size: 10px; font-weight: 800; }
.bf-sec { margin-top: 14px; break-inside: avoid; page-break-inside: avoid; }
.bf-sec h3 { display: flex; gap: 8px; margin: 0 0 6px; padding-bottom: 3px; border-bottom: 1.2px solid #111; font-size: 12px; font-weight: 800; color: #111; }
.bf-taf small { font-size: 8px; font-weight: 800; }
.bf-sheet pre { margin: 2px 0 6px; font: 600 9.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; color: #111; }
.bf-link { font-size: 10.5px; font-weight: 700; color: #1D4ED8; }
.bf-winds { border: 1px solid #D1D5DB; font-size: 10px; text-align: center; }
.bf-winds th, .bf-winds td { border-top: 1px solid #D1D5DB; padding: 3px; }
.bf-winds thead th { background: #F1F3F5; font-size: 9px; font-weight: 800; }
.bf-winds tbody th { text-align: left; padding-left: 6px; width: 70px; font-weight: 800; }
.bf-winds .bf-cruise { background: rgba(250,204,21,.35); }
.bf-cross { display: block; width: 100%; height: auto; }
.bf-legends { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 8px; font-weight: 800; }
.bf-legend { display: inline-flex; align-items: center; gap: 3px; }
.bf-legend i { width: 10px; height: 10px; border-radius: 2px; }
.bf-band { display: grid; grid-template-columns: 14px 1fr auto 70px; gap: 8px; font-size: 10px; align-items: baseline; }
.bf-band b { font-weight: 800; }
.bf-band small { text-align: right; font-size: 9px; }
.bf-danger { color: #DC2626; font-weight: 800; }
.bf-notam { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11px; }
.bf-notam small { flex: 1; font-size: 9px; font-weight: 600; }
.bf-notam-btn { font-size: 10px; font-weight: 800; color: #FFF; background: #2563EB; padding: 5px 10px; border-radius: 99px; text-decoration: none; }
#print-root { display: none; }
@media (max-width: 600px) {
  .trip { grid-template-columns: repeat(3, 1fr); }
  .doc-bar { padding: 8px 10px; }
}
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing { background: #FFF !important; margin: 0; }
  body.printing #print-root { display: block; }
  #print-root .sheet { box-shadow: none; padding: 0; margin: 0; zoom: 1 !important; }
  #print-root .nl-sheet { width: 100%; }
  #print-root .bf-sheet { width: 100%; }
  #print-root .bf-notam-btn { color: #1D4ED8; background: none; padding: 0; text-decoration: underline; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
