/* AeroPlanner Pro 5 — "aerodrome chart" identity.
   Chart paper and graphite for the work; taxiway-sign yellow is spent in one place only: the step rail,
   built like airfield guidance signs (location sign = where you are, direction signs = where you can go). */
@font-face { font-family: "Barlow"; src: url("../vendor/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../vendor/fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../vendor/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../vendor/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../vendor/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #F4F6F5; --sheet: #FFFFFF; --ink: #1E252B; --ink-2: #4B5761; --ink-3: #6B7782; --rule: #D5DCE0; --rule-2: #E6EBED;
  --tarmac: #262C31; --tarmac-2: #343B41; --sign: #F5C431; --sign-ink: #15191C;
  --approach: #9C2A6D; --water: #2D6C8C; --grass: #6F8F5A;
  --ok: #2E7A4D; --bad: #B2312A; --warn: #8A5A00; --mute: #6B7782; --focus: #1B6FD1;
  --f: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif; --fc: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
h1, h2, h3 { font-family: var(--fc); font-weight: 700; letter-spacing: .005em; margin: 0; }
h2 { font-size: 30px; line-height: 1.1; }
h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
small { color: var(--ink-3); }
a { color: var(--water); }

/* shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr) 340px; grid-template-rows: 56px minmax(0, 1fr); height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--tarmac); color: #E8ECEE; border-bottom: 1px solid #000; }
.brand { font-family: var(--fc); font-weight: 700; font-size: 19px; letter-spacing: .01em; color: #fff; white-space: nowrap; }
.brand span { color: var(--sign); }
.proj { font-size: 14px; color: #C9D1D6; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sp { flex: 1; }
.eng { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #C9D1D6; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #8A949B; display: inline-block; }
.dot.ready { background: #57C27E; } .dot.busy { background: var(--sign); } .dot.error { background: #F06A5E; } .dot.starting { background: #8FB7E8; }
.top .b { background: transparent; color: #fff; border-color: #5A646B; }
.top .b:hover { border-color: #fff; }

/* the signature: guidance-sign step rail */
.rail { background: var(--tarmac); padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; overflow: auto; border-right: 1px solid #000; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sign { display: grid; grid-template-columns: 34px 1fr; align-items: stretch; width: 100%; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; background: none; }
.sign .n, .sign .l { font-family: var(--fc); font-weight: 700; font-size: 17px; line-height: 1; padding: 9px 8px; }
.sign .n { text-align: center; background: var(--sign-ink); color: var(--sign); }
.sign .l { background: var(--sign); color: var(--sign-ink); }
.sign .l small { display: block; font: 500 12px/1.25 var(--f); color: #3D3200; margin-top: 3px; }
.sign[aria-current="step"] .n, .sign[aria-current="step"] .l { background: var(--sign-ink); color: var(--sign); box-shadow: inset 0 0 0 2px var(--sign); }
.sign[aria-current="step"] .l small { color: #E9D48A; }
.sign[aria-current="step"] .n { box-shadow: inset 2px 0 0 var(--sign), inset 0 2px 0 var(--sign), inset 0 -2px 0 var(--sign); }
.sign:not([aria-current="step"]):hover .l { background: #FFD65A; }
.rail .foot { margin-top: auto; color: #9AA4AA; font-size: 12px; line-height: 1.4; padding: 8px 4px 0; border-top: 1px solid var(--tarmac-2); }
.rail .foot a { color: #C9D1D6; }

/* workspace */
.main { overflow: auto; padding: 24px 28px 64px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.lead { color: var(--ink-2); max-width: 74ch; margin-bottom: 18px; }
.flow { font: 600 12.5px/1.4 var(--fc); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); margin: -4px 0 8px; }
.flow a { color: var(--ink); }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin: 0 0 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px 7px; font: 600 14px var(--f); color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 18px; margin: 0 0 16px; }
.card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 6px 0 10px; }
.f { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-2); min-width: 150px; }
.f > span { font-weight: 600; color: var(--ink); }
.f input, .f select, .f textarea, .t input, .t select { font: 14px var(--f); color: var(--ink); background: #fff; border: 1px solid #B9C3C9; border-radius: 3px; padding: 6px 8px; }
.f textarea { min-height: 64px; resize: vertical; }
.f input[type=number] { width: 9em; }
.wide { flex: 1 1 380px; }
.b { font: 600 14px var(--f); border: 1px solid #9AA6AD; background: #fff; color: var(--ink); border-radius: 3px; padding: 7px 13px; cursor: pointer; white-space: nowrap; }
.b:hover { border-color: var(--ink); }
.b.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.b.primary:hover { background: #000; }
.b.quiet { border-color: transparent; color: var(--water); padding: 4px 6px; }
.b:disabled { opacity: .45; cursor: not-allowed; }
.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tw { overflow: auto; max-width: 100%; }
.t th { text-align: left; font: 600 12.5px var(--f); color: var(--ink-2); border-bottom: 1px solid var(--ink); padding: 6px 8px; white-space: nowrap; }
.t td { border-bottom: 1px solid var(--rule-2); padding: 7px 8px; vertical-align: top; }
.t td.n, .t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.t tr.sel td { background: #FFF6D6; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: #F3F6F7; }
.empty { color: var(--ink-3); font-style: italic; }
.st { font: 600 12.5px var(--f); white-space: nowrap; }
.st-ok { color: var(--ok); } .st-bad { color: var(--bad); } .st-warn { color: var(--warn); } .st-mute { color: var(--mute); }
.tag { font: 600 10.5px var(--f); letter-spacing: .03em; padding: 1px 5px; border-radius: 2px; text-decoration: none; border: 1px solid; vertical-align: 1px; }
.tag-user { color: #234D7A; border-color: #9DB6D2; } .tag-source { color: #2E5E3A; border-color: #9CC2A6; } .tag-assumption { color: #7A4A00; border-color: #D9B678; } .tag-calc { color: #4B5761; border-color: #B9C3C9; }
.num { font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--rule); background: var(--sheet); margin-bottom: 16px; }
.kpis > div { padding: 10px 14px; border-right: 1px solid var(--rule-2); }
.kpis b { display: block; font: 700 22px/1.15 var(--fc); font-variant-numeric: tabular-nums; }
.kpis small { font-size: 12.5px; }
.note { background: #FFF8E1; border-left: 3px solid var(--sign); padding: 8px 12px; font-size: 13.5px; color: #3A3000; margin: 0 0 14px; }
.msg { background: #FDECEA; border-left: 3px solid var(--bad); padding: 8px 12px; margin: 0 0 14px; font-size: 14px; }
.ok-msg { background: #E8F3EC; border-left: 3px solid var(--ok); padding: 8px 12px; margin: 0 0 14px; font-size: 14px; }
.chk { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.chk li { padding: 4px 0 4px 22px; position: relative; border-bottom: 1px solid var(--rule-2); }
.chk li::before { position: absolute; left: 2px; top: 4px; font-weight: 700; }
.chk li.ok::before { content: "✓"; color: var(--ok); } .chk li.bad::before { content: "✕"; color: var(--bad); } .chk li.warn::before { content: "!"; color: var(--warn); } .chk li.mute::before { content: "–"; color: var(--mute); }

/* inspector */
.insp { background: var(--sheet); border-left: 1px solid var(--rule); overflow: auto; padding: 18px 18px 40px; font-size: 13.5px; }
.insp h4 { font: 700 15px var(--fc); margin: 18px 0 6px; }
.insp h4:first-child { margin-top: 0; }
.insp dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; }
.insp dt { color: var(--ink-2); } .insp dd { margin: 0; text-align: right; font-weight: 600; }
.insp select { width: 100%; font: 14px var(--f); padding: 6px; border: 1px solid #B9C3C9; border-radius: 3px; }
.next { background: var(--paper); border: 1px solid var(--rule); padding: 10px 12px; margin-top: 6px; }
.next b { display: block; font-family: var(--fc); font-size: 16px; }

/* plans */
.plan { width: 100%; height: auto; background: #FBFCFB; border: 1px solid var(--rule); display: block; touch-action: none; }
.planwrap { position: relative; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin: 8px 0; }
.legend i { display: inline-block; width: 14px; height: 10px; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.25); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.opt { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; }
.opt[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: -1px; }
.opt svg { width: 100%; height: 150px; display: block; background: #FBFCFB; border-bottom: 1px solid var(--rule-2); }
.opt div { padding: 8px 10px 10px; font-size: 13px; }
.opt b { font-family: var(--fc); font-size: 16px; display: block; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px; font-size: 14px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); }
.map { height: 460px; border: 1px solid var(--rule); background: #E8EEEA; }
.levels { position: relative; border: 1px solid var(--rule); background: #fff; overflow: hidden; }
.levels img { display: block; width: 100%; height: auto; user-select: none; }
.levels svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.busy { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 13.5px; }
.busy::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.splash { position: fixed; inset: 0; background: var(--tarmac); color: #E8ECEE; display: flex; align-items: center; justify-content: center; z-index: 100; }
.splash div { max-width: 460px; padding: 24px; }
.splash h1 { font-size: 34px; color: #fff; margin-bottom: 8px; }
.splash h1 span { color: var(--sign); }
.splash p { color: #C9D1D6; }

@media (max-width: 1280px) { .app { grid-template-columns: 210px minmax(0, 1fr); } .insp { display: none; } }
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); height: auto; min-height: 100vh; }
  .top { flex-wrap: wrap; gap: 8px; padding: 8px 16px; min-width: 0; } .top .proj, .top .sp { display: none; } .eng { font-size: 0; } .eng .dot, .eng button { font-size: 12px; }
  .top .b { padding: 6px 10px; font-size: 13px; } .rail { min-width: 0; } .main { min-width: 0; overflow-x: hidden; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; } .row { flex-wrap: wrap; } .wide { width: 100%; }
  .rail { flex-direction: row; overflow-x: auto; padding: 8px; } .rail ol { flex-direction: row; } .sign { width: auto; } .sign .l small, .rail .foot { display: none; }
  .main { padding: 16px; } .grid2, .grid3 { grid-template-columns: 1fr; } h2 { font-size: 24px; }
}
@media print { .rail, .top, .insp, .b { display: none !important; } .app { display: block; } .main { overflow: visible; } }
.gates { list-style: none; padding: 0; margin: 0 0 12px; } .gates li { padding: 2px 0; font-size: 13.5px; }

/* simulator-style 3D view */
.sim-hud { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; font: 500 12px/1.3 Barlow, Arial, sans-serif; }
.sim-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; pointer-events: auto; background: linear-gradient(rgba(10,20,28,.55), rgba(10,20,28,0)); }
.sim-bar button { background: rgba(255,255,255,.88); border: 0; border-radius: 3px; padding: 5px 9px; font: inherit; color: #12232e; cursor: pointer; }
.sim-bar button:hover, .sim-bar button:focus-visible { background: #fff; outline: 2px solid #0f6b8f; }
.sim-bar label { color: #fff; display: flex; gap: 6px; align-items: center; text-shadow: 0 1px 2px #000; }
.sim-bar input[type=range] { width: 120px; }
.sim-note { position: absolute; left: 8px; right: 8px; top: calc(100% + 0px); color: #fff; text-shadow: 0 1px 2px #000; font-size: 11px; padding: 4px 0; }
[id=v3d], [id=st3d] { position: relative; background: #9fb4c4; }
[id=v3d] canvas, [id=st3d] canvas { display: block; outline: none; }
:fullscreen .sim-hud { top: 0; }
@media (max-width: 640px) { .sim-bar button { padding: 4px 6px; } .sim-note { display: none; } }
.sim-panel { position: absolute; right: 8px; top: 46px; width: min(340px, calc(100% - 16px)); max-height: calc(100% - 60px); overflow: auto; pointer-events: auto; background: rgba(250,251,252,.96); color: #12232e; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 10px 12px; font-size: 12px; }
.sim-panel fieldset { border: 0; border-top: 1px solid #D5DCE0; margin: 0 0 6px; padding: 6px 0 0; display: grid; gap: 4px; }
.sim-panel legend { font-weight: 600; padding: 0 4px 0 0; }
.sim-panel label { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.sim-panel label:has(input[type=checkbox]) { justify-content: flex-start; }
.sim-panel select { max-width: 200px; font: inherit; }
.sim-panel p { margin: 4px 0 0; color: #4b5a63; }
details.airdet { margin: 8px 0; } details.airdet summary { cursor: pointer; font-weight: 600; }
.sim-status { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); pointer-events: none; background: rgba(10,20,28,.72); color: #fff; padding: 6px 10px; border-radius: 3px; font-size: 12px; }
.sim-prog { display: block; height: 3px; background: rgba(255,255,255,.25); margin-top: 4px; } .sim-prog i { display: block; height: 3px; background: #f2c230; }
.sim-bar button[aria-pressed=true] { background: #f2c230; }
.assure-gate {border-left:4px solid #bf9d62;background:#f4f0e7;padding:18px;margin:16px 0;color:#0b1f3a}
.assure-gate strong {display:block;font-size:1.25rem}.assure-gate span{display:block;margin-top:6px}
.assure-plan svg{display:block;width:100%;height:auto;min-width:0}.assure-plan .row{flex-wrap:wrap}
.assure-tabs{flex-wrap:wrap}.assure-gate li{margin:5px 0}
