/* Layout: one column, verdict first, then the departure window, then the evidence. */
:root {
  --bg: #f3f5f8; --panel: #ffffff; --ink: #18202b; --dim: #5a6777; --line: #d9dfe7; --sunk: #e9edf2;
  --course: #b0127c;            /* the magenta course line */
  --ok: #1d7a4a; --ok-bg: #dff3e7; --caution: #8a5a00; --caution-bg: #fdeec6; --nogo: #b3261e; --nogo-bg: #fbe0dd; --unk: #56616f; --unk-bg: #e4e8ee;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b; --panel: #171e28; --ink: #e6ebf2; --dim: #98a4b3; --line: #2a3442; --sunk: #1f2834;
    --course: #f25fc0;
    --ok: #6bd49a; --ok-bg: #153524; --caution: #f2c14e; --caution-bg: #3b2e0c; --nogo: #ff8a80; --nogo-bg: #43191a; --unk: #a7b2c0; --unk-bg: #27313e;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 4px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.brand i { width: 26px; height: 3px; background: var(--course); border-radius: 2px; display: inline-block; }
.tabs { display: flex; gap: 4px; background: var(--sunk); padding: 3px; border-radius: 9px; }
.tabs button { border: 0; background: transparent; color: var(--dim); font: inherit; font-weight: 600; padding: 6px 14px; border-radius: 7px; cursor: pointer; }
.tabs button.on { background: var(--panel); color: var(--ink); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .cell:focus-visible { outline: 2px solid var(--course); outline-offset: 2px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); margin: 0 0 10px; font-weight: 700; }
.muted { color: var(--dim); } .small { font-size: 13px; }
.drops { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.drop.over { border-color: var(--course); background: var(--sunk); }
.drop b { font-size: 14px; } .drop span { color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.fields .wide { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--dim); min-width: 0; }
label.f small { font-weight: 400; }
input[type=text], input[type=number], input[type=datetime-local], select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.btn { font: inherit; font-weight: 650; border-radius: 9px; padding: 9px 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--course); border-color: var(--course); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.err { color: var(--nogo); }
.verdict { border-radius: 12px; padding: 16px 18px; border: 1px solid; display: flex; flex-direction: column; gap: 6px; }
.verdict .call { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.verdict .sub { font-size: 14px; }
.s-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.s-caution { background: var(--caution-bg); color: var(--caution); border-color: var(--caution); }
.s-nogo { background: var(--nogo-bg); color: var(--nogo); border-color: var(--nogo); }
.s-unknown { background: var(--unk-bg); color: var(--unk); border-color: var(--unk); }
.verdict .sub, .verdict .facts { color: var(--ink); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; margin-top: 4px; }
.facts b { font-weight: 650; }
.slider { width: 100%; accent-color: var(--course); margin: 6px 0 2px; }
.when { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.when .t { font-size: 20px; font-weight: 750; }
.strip { display: flex; gap: 3px; overflow-x: auto; padding: 10px 0 6px; }
.cell { flex: 0 0 38px; border: 0; background: none; padding: 0; font: inherit; color: var(--dim); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cell .hr { font-size: 11px; height: 28px; display: flex; flex-direction: column; justify-content: flex-end; line-height: 1.15; text-align: center; }
.cell .hr b { color: var(--ink); font-size: 10px; text-transform: uppercase; }
.cell .bar { width: 100%; height: 44px; border-radius: 6px; border: 1px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; line-height: 1.1; }
.cell .bar small { font-weight: 500; font-size: 10px; }
.cell.sel .bar { box-shadow: 0 0 0 2px var(--course); }
.cell.prov .bar { border-style: dashed; }
.cell .mk { font-size: 11px; height: 14px; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--dim); }
.checks { display: flex; flex-direction: column; }
.check { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; padding-top: 0; }
.pill { justify-self: start; align-self: start; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.check.nt { grid-template-columns: 150px minmax(0, 1fr); } .check.nt .pill { white-space: normal; text-align: center; }
.check .lab { font-weight: 650; } .check .det { grid-column: 2; color: var(--dim); font-size: 14px; overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
.tag { display: inline-block; margin-left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); border: 1px dashed var(--line); border-radius: 999px; padding: 1px 7px; vertical-align: 1px; }
.olk { display: grid; gap: 5px; }
.olk-r { display: grid; grid-template-columns: 46px repeat(3, minmax(0, 1fr)); gap: 5px; align-items: stretch; }
.olk-h span { font-size: 11px; font-weight: 650; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; }
.olk-d { font-size: 13px; font-weight: 650; align-self: center; line-height: 1.2; } .olk-d small { display: block; font-weight: 500; color: var(--dim); }
.olk-c { font: inherit; text-align: left; border: 1px solid; border-radius: 8px; padding: 5px 7px; display: flex; flex-direction: column; gap: 1px; cursor: pointer; min-width: 0; }
.olk-c.ol { border-style: dashed; }
.olk-c.sel { box-shadow: 0 0 0 2px var(--course); }
.olk-c.none { border: 1px dashed var(--line); color: var(--dim); align-items: center; justify-content: center; cursor: default; }
.olk-c .w { font-weight: 800; font-size: 14px; }
.olk-c .m { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.olk-c .tg { font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85; }
@media (min-width: 560px) { .olk-r { grid-template-columns: 70px repeat(3, minmax(0, 1fr)); gap: 6px; } .olk-c .m { font-size: 12px; } }
.olk-c .y { font-size: 10.5px; color: var(--dim); line-height: 1.25; overflow-wrap: anywhere; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); font-weight: 700; padding: 4px 10px 6px 0; white-space: nowrap; }
td { padding: 6px 10px 6px 0; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
td.wrapc { white-space: normal; min-width: 180px; }
td .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; border: 1px solid; }
.brief { font-size: 15px; } .brief p { margin: 0 0 8px; } .brief ul { margin: 0 0 10px; padding-left: 20px; } .brief li { margin: 2px 0; }
details { border-top: 1px solid var(--line); padding: 8px 0; } details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 650; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.45 var(--mono); margin: 8px 0 0; color: var(--dim); max-height: 420px; overflow-y: auto; }
.empty { text-align: center; padding: 28px 16px; color: var(--dim); }
.empty b { color: var(--ink); display: block; font-size: 16px; margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 4px 0; } .chk input { margin-top: 4px; }
.note { background: var(--sunk); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--dim); }
.foot { font-size: 12px; color: var(--dim); text-align: center; }
@media (max-width: 520px) { .check, .check.nt { grid-template-columns: 1fr; } .check .det { grid-column: 1; } .verdict .call { font-size: 24px; } }
@media (prefers-reduced-motion: no-preference) { .spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--course); border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; } @keyframes sp { to { transform: rotate(360deg); } } }

/* ----- Flight sheet: always black on white, sized for one letter page ----- */
.sheet { background: #fff; color: #000; width: 7.8in; box-sizing: border-box; min-height: 4in; padding: 0.15in; margin: 0 auto; border: 1px solid var(--line); font: 12px/1.25 var(--sans); }
.sheet .empty { color: #555; }
.sheet .hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; border-bottom: 2px solid #000; padding-bottom: 4px; }
.sheet .hd .rt { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; } .sheet .hd .meta { font-size: 11px; }
.sheet .tach { display: flex; gap: 8px; } .sheet .wbox { border: 1.5px solid #000; min-width: 1.15in; height: 0.52in; padding: 2px 4px; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.sheet .aps { display: grid; grid-template-columns: 1fr 1fr; gap: 0.14in; margin: 0.1in 0; }
.sheet .ap { border: 2.5px solid #000; display: flex; flex-direction: column; }
.sheet .ap.arr { border-style: double; border-width: 6px; }
.sheet .ap .bar { background: #000; color: #fff; display: flex; justify-content: space-between; align-items: baseline; padding: 2px 6px; font-weight: 800; font-size: 11px; letter-spacing: 0.08em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet .ap.arr .bar { background: #fff; color: #000; border-bottom: 2px solid #000; }
.sheet .ap .bar b { font-size: 22px; letter-spacing: 0; }
.sheet .ap .in { display: grid; grid-template-columns: 1fr 1.3in; gap: 6px; padding: 5px 6px; }
.sheet .fq { display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 3px 8px; font-size: 12px; align-items: baseline; }
.sheet .fq .n { font-weight: 700; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; } .sheet .fq .v { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; } .sheet .fq .v small { font-weight: 400; font-size: 9px; }
.sheet .wr { display: flex; gap: 5px; padding: 0 6px 6px; flex-wrap: wrap; } .sheet .wr .wbox { flex: 1 1 0; min-width: 0.6in; height: 0.5in; }
.sheet .ed { border: 0; border-bottom: 1px dotted #555; background: transparent; color: #000; font: inherit; padding: 0; width: 100%; min-width: 0; border-radius: 0; }
.sheet .tpa { font-size: 11px; padding: 0 6px 4px; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; margin-top: auto; } .sheet .tpa .ed { width: 0.8in; flex: 0 0 0.8in; font-weight: 700; font-size: 13px; }
.sheet table { font-size: 11px; border: 1.5px solid #000; table-layout: fixed; width: 100%; }
.sheet col.c4 { width: 4.3%; } .sheet col.c5 { width: 5.2%; } .sheet col.c6 { width: 6%; } .sheet col.c8 { width: 8.6%; } .sheet col.c9 { width: 9.3%; } .sheet col.c10 { width: 10.2%; } .sheet th { color: #000; font-size: 7.5px; letter-spacing: 0; border-bottom: 1.5px solid #000; padding: 3px 1px; text-align: center; white-space: normal; }
.sheet td { border-top: 1px solid #000; border-left: 1px solid #999; padding: 4px 1px; text-align: center; white-space: nowrap; overflow: hidden; height: 0.44in; vertical-align: middle; }
.sheet td:first-child { border-left: 0; text-align: left; font-weight: 800; font-size: 12.5px; padding-left: 3px; } .sheet td small { display: block; color: #333; font-size: 8.5px; }
.sheet td.atc { text-align: left; padding-left: 3px; } .sheet td.atc .ed { font-size: 10px; letter-spacing: -0.01em; font-weight: 600; } 
.sheet .notes { border: 1.5px solid #000; height: 1.2in; break-inside: avoid; margin-top: 0.1in; padding: 2px 4px; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.sheet .ft { font-size: 8.5px; color: #333; margin-top: 4px; display: flex; justify-content: space-between; gap: 10px; }
@media print {
  @page { size: letter portrait; margin: 0.75in 0.35in 0.3in; }
  body { background: #fff; } .wrap { padding: 0; max-width: none; display: block; }
  .top, .noprint, #pageReport, #pageSettings, .foot { display: none !important; }
  .scroll { overflow: visible; } .sheet { border: 0; width: auto; padding: 0; margin: 0; }
  .sheet .ed { border-bottom-color: transparent; }
}

/* ----- Web app additions ----- */
.brand .mark { width: 28px; height: 28px; border-radius: 7px; display: block; }
.wrap { padding-top: env(safe-area-inset-top, 0px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ver { font-size: 11px; font-weight: 600; color: var(--dim); background: var(--sunk); border-radius: 999px; padding: 2px 8px; letter-spacing: 0.02em; }
.upd { position: sticky; top: 0; z-index: 20; background: var(--course); padding-top: env(safe-area-inset-top, 0px); }
.upd button { display: block; width: 100%; border: 0; background: transparent; color: #fff; font: inherit; padding: 10px 16px; cursor: pointer; text-align: center; }
.whatsnew ul { margin: 0 0 12px; padding-left: 20px; } .whatsnew li { margin: 4px 0; }
.verdict .disc { font-size: 12.5px; opacity: 0.85; }
#gate span { display: block; max-width: 34em; margin: 0 auto; }
@media print { .upd, #whatsnew, #gate { display: none !important; } }

.gatepaste { display: flex; flex-direction: column; gap: 8px; margin: 14px auto 0; text-align: left; width: 100%; max-width: 520px; }
.gatepaste .row { display: flex; gap: 8px; flex-wrap: wrap; }
.gatepaste input { flex: 1 1 220px; min-width: 0; }

.sheet .notes .say { font-size: 10.5px; font-weight: 600; color: #000; margin-top: 3px; text-transform: none; letter-spacing: 0; line-height: 1.3; }

.modelsw .mrow { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.modelsw .tabs { flex-wrap: wrap; }
.modelsw .tabs button { font-size: 13px; padding: 6px 10px; }
.cmp { margin-top: 10px; display: grid; gap: 6px; }
.cmp table { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
.cmp th:first-child, .cmp td:first-child { width: 38%; }
.cmp th, .cmp td { white-space: normal; overflow-wrap: anywhere; }
.cmp th, .cmp td { text-align: left; padding: 5px 8px 5px 0; border-top: 1px solid var(--line); vertical-align: top; }
.cmp th { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 650; border-top: 0; }
.cmp td.chg { font-weight: 700; }
.cmp .same { color: var(--dim); }
/* Flight sheet, 0.3.0 */
.sheet .hd { align-items: center; }
.sheet .hd .logo { width: 0.46in; height: 0.46in; flex: 0 0 auto; border-radius: 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet .hd .ttl { flex: 1 1 auto; min-width: 0; }
.sheet .glance { display: flex; flex-wrap: wrap; gap: 3px 14px; align-items: baseline; font-size: 10.5px; padding: 4px 6px; margin-top: 5px; border: 1.5px solid #000; border-left-width: 6px; }
.sheet .glance b { font-size: 11.5px; letter-spacing: 0.02em; }
.sheet .glance.s-nogo { border-left-style: double; border-left-width: 8px; }
.sheet .ap .bar span i { font-style: normal; font-weight: 600; font-size: 9px; letter-spacing: 0.04em; margin-left: 8px; opacity: 0.85; }
.sheet .ap .in { grid-template-columns: minmax(0, 1fr) 1.5in; }
.sheet .ap .diaw { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.sheet .ap .dia { width: 1.45in; height: 1.45in; }
.sheet .ap .diaw svg:not(.dia) { width: 1.3in; height: 1.3in; }
.sheet .ap .cap { font-size: 8.5px; font-weight: 700; text-align: center; line-height: 1.15; }
.sheet .tpa .agl { margin-left: auto; font-size: 10px; } .sheet .tpa .agl b { font-size: 12px; }
.sheet col.w45 { width: 4.5%; } .sheet col.w5 { width: 5%; } .sheet col.w55 { width: 5.5%; } .sheet col.w7 { width: 7%; } .sheet col.w75 { width: 7.5%; } .sheet col.w8 { width: 8%; } .sheet col.w9 { width: 9%; } .sheet col.w105 { width: 10.5%; }
.sheet td.nr { text-align: left; padding-left: 3px; font-size: 10.5px; white-space: normal; line-height: 1.15; }
.sheet td.nr b { font-weight: 800; } .sheet td.nr small { display: block; font-size: 8px; color: #000; white-space: normal; line-height: 1.1; }
.sheet td:first-child small { font-weight: 600; font-size: 8px; }
.sheet .notes .nt { font-size: 8.5px; } .sheet .notes .say div { margin-top: 2px; } .sheet .notes .say b { font-weight: 800; }
.sheet .notes { height: auto; }
.sheet .glance { color: #000; background: #fff; } .sheet .glance * { color: #000; }
.sheet .ap .cap div { white-space: nowrap; }
/* Long routes: tighter so the sheet stays on one page */
.sheet.dense td { height: 0.34in; padding-top: 2px; padding-bottom: 2px; }
.sheet.dense .ap .dia { width: 1.2in; height: 1.2in; } .sheet.dense .ap .in { grid-template-columns: minmax(0, 1fr) 1.25in; }
.sheet.dense .wbox { height: 0.42in; } .sheet.dense .wr .wbox { height: 0.4in; } .sheet.dense .fq .v { font-size: 14px; } .sheet.dense .fq { gap: 1px 8px; }
.sheet.dense .notes { min-height: 0.45in !important; }
.sheet.xdense td { height: 0.29in; font-size: 10px; } .sheet.xdense td.nr small, .sheet.xdense td:first-child small { display: none; }
.sheet.xdense .glance { font-size: 9.5px; padding: 2px 5px; }
.sheet col.w6 { width: 6%; }
/* Printing (0.3.1): print the sheet exactly as laid out on screen, scaled to fit one page in any browser.
   Safari on iPhone and iPad keeps its own margins and header, so the sheet keeps its 7.8 in layout and is zoomed to fit. */
@media print {
  @page { size: letter portrait; margin: 0.3in; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; gap: 0 !important; }
  #pageSheet > :not(.scroll) { display: none !important; }
  .sheet { width: 7.8in !important; padding: 0.05in !important; margin: 0 !important; zoom: var(--pz, 0.9); break-inside: avoid; }
  .sheet table, .sheet .aps, .sheet .notes { break-inside: avoid; }
}

/* 0.3.2: roomier navlog rows; leg distance bold for checking waypoints in the navigator */
.sheet td { font-size: 10.5px; letter-spacing: -0.15px; }
.sheet td.dist b { font-weight: 800; font-size: 12px; letter-spacing: 0; }
.sheet td.atc { font-size: 9.5px; white-space: normal; line-height: 1.1; }
.sheet td.atc .ed { white-space: normal; }
.sheet col.w4 { width: 4%; } .sheet col.w95 { width: 9.5%; }
.sheet td.atc .ed { font-size: 9px; letter-spacing: -0.03em; }

/* 0.3.5: wrapping ATC entries; fuel actual split into leg (top) and cumulative (bottom) */
.sheet td.atc .edw { font-size: 9.5px; font-weight: 600; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; min-height: 1.1em; outline: none; border-bottom: 1px dotted #555; }
@media print { .sheet td.atc .edw { border-bottom-color: transparent; } }
.sheet td.split { padding: 0; position: relative; vertical-align: top; }
.sheet td.split::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #000; }
.sheet td.split .hl { height: 50%; font-size: 7px; color: #666; text-align: left; padding: 1px 3px 0; text-transform: uppercase; letter-spacing: 0.05em; position: absolute; left: 0; }
.sheet td.split .hl:first-child { top: 0; } .sheet td.split .hl:last-child { top: 50%; }

.sheet col.w85 { width: 8.5%; }
.sheet td.split .hl { font-size: 6.5px; }
.sheet table tr td:nth-child(8) { font-size: 10px; letter-spacing: -0.3px; }   /* time leg/rem: narrower column */
