@font-face { font-family: GNS; src: url(../fonts/BarlowSemiCondensed-SemiBold.ttf); font-weight: 600; }
:root {
  --bg: #15171a; --panel: #1f2226; --line: #33373d; --text: #e7e9ec; --muted: #9aa1aa; --accent: #3fb6ff; --ok: #3fd27a; --warn: #ffb547;
  --bezel: #2b2e33; --bezel-hi: #3a3e44; --keycap: #34383e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
header { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header h1 { font-size: 16px; margin: 0; letter-spacing: .02em; }
header .grow { flex: 1; }
header select, header > button { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
.keys { position: relative; }
.keys summary { cursor: pointer; color: var(--muted); }
.keys table { position: absolute; right: 0; top: 26px; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; white-space: nowrap; font-size: 12px; }
.keys td:first-child { color: var(--accent); padding-right: 12px; }

main { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
@media (max-width: 1100px) { main { flex-wrap: wrap; } }

/* ---------- the unit ---------- */
.unit { grid-area: unit; display: grid; grid-template-columns: 128px auto 128px; gap: 10px; padding: 14px 16px 18px; border-radius: 22px;
  background: linear-gradient(180deg, var(--bezel-hi), var(--bezel) 40%, #222428); box-shadow: 0 10px 30px #0008, inset 0 1px 0 #ffffff14; width: max-content; }
.col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.col.left, .col.right { padding-top: 34px; }
.brand { align-self: stretch; display: flex; justify-content: space-between; font-weight: 700; letter-spacing: .12em; color: #d9dde2; font-size: 13px; }
.brand span { font-weight: 600; letter-spacing: .02em; color: #aab; }
.screen { padding: 8px; background: #0b0c0e; border-radius: 6px; box-shadow: inset 0 0 0 2px #000, inset 0 0 18px #000; }
#lcd { display: block; width: 640px; height: 468px; image-rendering: auto; }
.m430 .unit { grid-template-columns: 150px auto 150px; }
.m430 .col.left, .m430 .col.right { padding-top: 28px; }
.g2 { display: grid; grid-template-columns: auto auto; gap: 10px 12px; align-items: center; justify-items: center; }
.rng.h { flex-direction: row; gap: 2px; }
.m430 .dual { margin-top: auto; }
.keyrow { display: flex; gap: 14px; }
.key { min-width: 64px; padding: 6px 10px; border-radius: 13px; border: 1px solid #111; background: linear-gradient(#41454b, var(--keycap)); color: #f2f2f2;
  font-weight: 700; font-size: 12px; letter-spacing: .04em; box-shadow: 0 2px 0 #0009, inset 0 1px 0 #ffffff1a; }
.key:active, .key.pressed { transform: translateY(1px); box-shadow: 0 1px 0 #0009; filter: brightness(1.25); }
.flip { min-width: 54px; padding: 10px 6px; }
.rng { display: flex; flex-direction: column; align-items: center; border-radius: 14px; background: var(--keycap); padding: 4px; border: 1px solid #111; }
.rng .key { min-width: 48px; box-shadow: none; border: 0; background: none; }
.rng span { font-size: 11px; font-weight: 700; }
.knob-s { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #111; background: radial-gradient(circle at 40% 35%, #5a5f66, #23262a); color: #ddd; font-weight: 700; line-height: 1; }
.knob-s small { display: block; font-size: 7px; color: #8ec; }
.label { font-size: 11px; font-weight: 700; color: #cfd3d8; margin-top: auto; }

.dual { position: relative; width: 116px; height: 116px; }
.ring { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(#2a2d31 0 6deg, #3c4046 6deg 12deg); border: 2px solid #111; box-shadow: 0 0 0 3px #3fd27a55 inset; cursor: ns-resize; }
.inner { position: absolute; inset: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4b5056, #1d1f22); border: 2px solid #0d0d0d; cursor: ns-resize; }
.arr { position: absolute; width: 26px; height: 22px; border: 0; background: none; color: #fff; font-size: 16px; font-weight: 700; padding: 0; text-shadow: 0 1px 2px #000; }
.arr.o.l { left: 6px; top: 6px; } .arr.o.r { right: 6px; top: 6px; }
.arr.i.l { left: 2px; top: 2px; font-size: 13px; } .arr.i.r { right: 2px; top: 2px; font-size: 13px; }
.push { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); border: 0; background: none; color: #eee; font-size: 9px; font-weight: 800; line-height: 1.1; }

/* hint pulse (lesson "Show me") */
.hint { outline: 3px solid var(--warn) !important; outline-offset: 3px; animation: pulse .8s ease-in-out infinite alternate; }
@keyframes pulse { from { outline-color: #ffb54733; } to { outline-color: var(--warn); } }

/* ---------- lessons ---------- */
.lesson { flex: 1; min-width: 340px; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.lhead { display: flex; justify-content: space-between; align-items: baseline; }
.lesson h2 { font-size: 15px; margin: 0 0 8px; }
.lesson h3 { font-size: 14px; margin: 4px 0; }
.brief { color: #cfd3d8; }
.steps { padding-left: 20px; margin: 8px 0; }
.steps li { margin: 6px 0; color: var(--muted); }
.steps li.now { color: var(--text); }
.steps li.now::marker { color: var(--warn); }
.steps li.ok { color: var(--ok); text-decoration: line-through; text-decoration-color: #3fd27a55; }
.steps b { color: #fff; }
.done { color: var(--ok); font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; justify-content: flex-end; }
.row button, .opts button { background: #2a2e33; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
.row .pri, dialog .pri { background: var(--accent); border-color: var(--accent); color: #001018; font-weight: 600; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opts button { text-align: left; }
.opts .right { border-color: var(--ok); color: var(--ok); }
.opts .wrong { border-color: #ff6b6b; color: #ff6b6b; }
#outline { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
#outline summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.lsn { display: flex; gap: 6px; width: 100%; text-align: left; background: none; border: 0; padding: 3px 4px; border-radius: 6px; color: #cfd3d8; }
.lsn:hover { background: #2a2e33; }
.lsn.cur { background: #24384a; color: #fff; }
.lsn .ck { width: 14px; color: var(--ok); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 18px; width: min(420px, 92vw); }
dialog::backdrop { background: #000a; }
dialog label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0; }
dialog input { display: block; width: 100%; margin-top: 4px; background: #111; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; text-transform: uppercase; }
dialog button { background: #2a2e33; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.err { color: #ff6b6b; min-height: 1em; }


/* photo bezel (430W): artwork + hotspots, scaled as one piece */
.unit.photo { display: block; padding: 0; background: none; box-shadow: none; border-radius: 0; width: calc(446px * var(--s)); height: calc(186px * var(--s)); --s: 1; }
.bz { position: relative; width: var(--w); height: var(--h); transform: scale(var(--s)); transform-origin: 0 0; }
.bzsvg { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; filter: drop-shadow(0 6px 12px #0009); }
.bzsvg .kl { fill: #f4f4f4; font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif; font-weight: 700; text-anchor: middle; letter-spacing: .02em; }
.bzsvg .lbl { fill: #e9e9e9; font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif; font-weight: 700; }
.bzsvg .logo { fill: #f2f2f2; font-family: "Arial Black", Arial, sans-serif; font-weight: 900; font-style: italic; letter-spacing: .04em; }
/* the LCD is drawn at a whole-pixel scale; nearest-neighbour keeps its pixels square and sharp when the cockpit scale shrinks it */
.bz canvas { position: absolute; image-rendering: pixelated; }
.hs { position: absolute; background: transparent; border: 0; padding: 0; border-radius: 4px; cursor: pointer; }
.hs.round { border-radius: 50%; }
.hs:hover { background: #ffffff14; }
.hs:active, .hs.pressed { background: #ffffff2e; }
.hs.kring, .hs.kin { cursor: grab; }
/* dual-knob guide while the pointer is over it: the outer ring and the inner knob are separate zones, each turned
   with its left (−) or right (+) half; the middle band of the inner knob pushes. The zone under the pointer is brighter. */
.hs.kring:hover, .hs.kring:has(+ .kin:hover) {
  background: linear-gradient(90deg, transparent calc(50% - .5px), #ffffffa0 0 calc(50% + .5px), transparent 0),
    radial-gradient(circle closest-side, transparent 71%, var(--kz, #4da3ff26) 72%);
  box-shadow: 0 0 0 1px #ffffff70;
}
.hs.kring:hover { --kz: #4da3ff66; }
.hs.kin:hover, .hs.kring:hover + .kin { box-shadow: 0 0 0 1px #ffffff70; background: #4da3ff1a; }
.hs.kin:hover { background: linear-gradient(90deg, #4da3ff66 33%, #ffffff38 33% 67%, #4da3ff66 67%); }
.hs.kring:hover::before, .hs.kring:hover::after, .hs.kin:hover::before, .hs.kin:hover::after {
  position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font: 700 9px/1 system-ui, sans-serif;
  text-shadow: 0 0 2px #000, 0 0 2px #000; pointer-events: none;
}
.hs.kring:hover::before, .hs.kin:hover::before { content: '−'; left: 3%; }
.hs.kring:hover::after, .hs.kin:hover::after { content: '+'; right: 3%; }
.hs.kin:hover::before { left: 9%; }
.hs.kin:hover::after { right: 9%; }
.bz .hint { outline-width: 1.5px; outline-offset: 1px; }

.chal { color: #ffcf40; font-weight: 600; }
.lesson .stars { color: #ffcf40; letter-spacing: 2px; }

/* ---------- G5 face (dashboard) ---------- */
/* G5: 3.4 x 3.6 in with a 3.5 in 320x240 screen (panel units: 71.4 per inch, like the 430W); logo on top, controls below */
.g5 { position: absolute; left: 0; top: 0; width: 243px; height: 257px; border-radius: 12px; background: linear-gradient(#26272a, #121315 55%, #0d0e0f); box-shadow: inset 0 1px 0 #ffffff1c, 0 3px 6px #000a; }
.g5logo { position: absolute; left: 0; right: 0; top: 17px; text-align: center; font: 700 10px Arial, sans-serif; color: #e9e9e9; letter-spacing: .14em; pointer-events: none; }
.g5scr { position: absolute; left: 14px; top: 38px; width: 215px; height: 161px; border-radius: 3px; box-shadow: 0 0 0 2px #000, 0 0 0 3px #ffffff12; }
.g5pwr { position: absolute; left: 18px; top: 212px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #000; background: radial-gradient(circle at 45% 35%, #3a3b3f, #141517); color: #e8e8e8; font: 13px/26px Arial; padding: 0; text-align: center; box-shadow: 0 2px 3px #000a; }
.g5pwr:active { filter: brightness(1.4); }
.g5sens { position: absolute; left: 66px; top: 221px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #555, #111); }
.g5sd { position: absolute; left: 102px; top: 203px; width: 38px; height: 3px; border-radius: 1px; background: #050505; }
.g5knob { position: absolute; left: 186px; top: 207px; width: 38px; height: 38px; border-radius: 50%; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 44% 38%, #5b5d63 0 6%, #2e2f33 44%, #18191b 50%, transparent 51%), repeating-conic-gradient(#08090a 0 4deg, #54565c 4deg 7deg, #1e1f22 7deg 10deg); box-shadow: 0 3px 5px #000d, inset 0 0 0 1px #000; }
.g5knob:hover { filter: brightness(1.3); }
.ktip { position: fixed; transform: translate(-50%, -100%); padding: 2px 6px; border-radius: 4px; background: #000d; color: #fff; font: 600 12px/1.3 system-ui, sans-serif; pointer-events: none; z-index: 50; }
header .thr input { width: 120px; vertical-align: middle; }
#identText { color: #7dff6a; font: 600 12px ui-monospace, monospace; }

.rack { position: relative; flex: none; width: 446px; background: linear-gradient(#3f4045, #2b2c30 55%, #222327); border-radius: 5px; box-shadow: inset 0 1px 0 #ffffff24, inset 0 -1px 0 #000a, 0 3px 6px #000b; }
.rack button { font-family: "Arial Narrow", Arial, sans-serif; }
.plate { position: absolute; right: 8px; bottom: 3px; font: 700 6.5px Arial, sans-serif; color: #c9cbd0; letter-spacing: .08em; }
.rknob { position: absolute; width: 50px; height: 50px; right: 22px; top: 15px; border-radius: 50%; cursor: ew-resize; touch-action: none;
  background: radial-gradient(circle at 44% 38%, #55575d 0 6%, #2d2e32 30%, #17181a 37%, transparent 38%), repeating-conic-gradient(#08090a 0 3deg, #54565c 3deg 5deg, #1e1f22 5deg 8deg); box-shadow: 0 3px 5px #000d, inset 0 0 0 1px #000; }
.rknob:hover { filter: brightness(1.2); }
.rknob.small { width: 30px; height: 30px; top: 14px; right: 26px; background: radial-gradient(circle at 44% 38%, #6a6c72 0 8%, #2f3034 62%, transparent 63%), repeating-conic-gradient(#08090a 0 4deg, #5c5e64 4deg 7deg, #1e1f22 7deg 10deg); }

.gma { height: 58px; }
.mkrs { position: absolute; left: 12px; top: 8px; display: flex; flex-direction: column; gap: 3px; }
.mk { width: 22px; height: 12px; border-radius: 2px; font: 700 8px/12px Arial; text-align: center; color: #000; opacity: .24; box-shadow: inset 0 0 0 1px #0007; }
.mk.o { background: #4f7bff; } .mk.m { background: #ffb02e; } .mk.i { background: #fff; }
.mk.lit { opacity: 1; }
.mk.o.lit { box-shadow: 0 0 9px 2px #4f7bff; } .mk.m.lit { box-shadow: 0 0 9px 2px #ffb02e; } .mk.i.lit { box-shadow: 0 0 9px 2px #fff; }
.gkeys { position: absolute; left: 50px; top: 7px; display: grid; grid-template-columns: repeat(5, 54px); gap: 4px 6px; }
.gk { position: relative; height: 20px; padding: 6px 2px 0; border-radius: 3px; border: 1px solid #000; background: linear-gradient(#5f6266, #393b3e); color: #f2f2f2; font: 700 7px/1 Arial, sans-serif; box-shadow: 0 1px 0 #0009, inset 0 1px 0 #ffffff24; }
.gk:active { transform: translateY(.5px); filter: brightness(1.2); }
.gk::before { content: ''; position: absolute; top: 2px; left: 16px; right: 16px; height: 2px; border-radius: 1px; background: #1c1d1e; }
.gk.on::before { background: #7dff6a; box-shadow: 0 0 4px #7dff6a; }
.gk:disabled { cursor: default; opacity: 1; }



/* the 530W keeps its own CSS bezel; it is zoomed to the stack width */
.m530 .stack .unit { width: max-content; }

/* ---------- GNS trainer page: the unit alone beside the course ---------- */
header .back { color: var(--accent); text-decoration: none; font-weight: 600; }
.gnsmain { align-items: flex-start; }
.gnsunit { flex: 1 1 560px; min-width: 0; }
.gnsnote { margin: 10px 2px 0; }
.gnsnote a { color: var(--accent); }
.small { font-size: 12px; }
header .crs { display: inline-flex; align-items: center; gap: 6px; }
.hknob { display: inline-block; width: 22px; height: 22px; border-radius: 50%; cursor: grab; touch-action: none; vertical-align: middle;
  background: radial-gradient(circle, #2a2b2e 0 38%, transparent 39%), repeating-conic-gradient(#121314 0 9deg, #4a4c50 9deg 18deg); box-shadow: 0 1px 2px #000a; }
.hknob:hover { filter: brightness(1.35); }
.annrow { display: flex; gap: 3px; width: 659px; height: 20px; }
.annrow span { flex: 1; display: flex; align-items: center; justify-content: center; font: 700 8px/1 Arial, sans-serif; letter-spacing: .03em; background: #0b0b0c; color: #3a3d41; border: 1px solid #000; border-radius: 2px; }
.annrow span.on { color: #1a1300; background: linear-gradient(#ffd566, #f7b824); box-shadow: 0 0 7px #ffc63aaa; }
.annrow span[data-a="GPS"].on, .annrow span[data-a="VLOC"].on, .annrow span[data-a="TERM"].on, .annrow span[data-a="LPV"].on, .annrow span[data-a="LNAV"].on { background: #46e07c; box-shadow: 0 0 5px #46e07c99; }
.annrow span[data-a="INTEG"].on { background: #ff8a1f; }
/* GNS trainer stage, in panel units, zoomed to fit (trainer.js sets --k): the 430W big on top, G5s and CDI below it, the autopilot at the bottom */
.ckp { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 714px; margin: 0 auto; zoom: var(--k, 1); }
.ckp .annrow { width: 714px; height: 22px; }
.ckp .unit.photo { --s: 1.6; }
.g5row { display: flex; justify-content: center; align-items: center; gap: 10px; }
.g5row .g5 { position: relative; zoom: .92; }
.cdiw { position: relative; width: 200px; height: 200px; zoom: 1.18; }
.phelp { width: 714px; min-height: 18px; margin: 0; padding: 2px 8px; font-size: 12px; line-height: 1.3; color: #b7bec6; background: #1b2026; border-radius: 6px; }
.lcdmk { position: absolute; transform: translate(-50%, -50%); padding: 0 4px; height: 11px; border-radius: 6px; background: var(--warn); color: #1a1300; font: 700 7px/11px system-ui, sans-serif; box-shadow: 0 0 0 1px #000, 0 1px 3px #000a; pointer-events: none; z-index: 2; }
.kap { height: 82px; }
.kapd { position: absolute; left: 14px; top: 8px; width: 290px; height: 36px; background: #0b0d0a; border-radius: 3px; box-shadow: inset 0 0 6px #000; display: grid; grid-template-columns: 26px 64px 64px 1fr; align-items: center; color: #d6e9c6; font: 700 15px/1 "Arial Narrow", Arial, sans-serif; padding: 0 8px; }
.kapd small { display: block; font-size: 7px; color: #d6e9c6; margin-top: 2px; letter-spacing: .04em; min-height: 7px; }
.kapd .apl { font-size: 9px; }
.kapd .apl.flash { animation: blink .5s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.kapd .num { text-align: right; font-size: 17px; }
.kapd .num small { display: inline; font-size: 8px; margin-left: 3px; }
.kapk { position: absolute; left: 14px; top: 52px; display: flex; gap: 5px; align-items: center; }
.kap button { height: 20px; min-width: 32px; border-radius: 3px; border: 1px solid #000; background: linear-gradient(#5f6266, #393b3e); color: #f2f2f2; font: 700 8px Arial, sans-serif; padding: 0 4px; box-shadow: 0 1px 0 #0009, inset 0 1px 0 #ffffff24; }
.kap button:active { transform: translateY(.5px); filter: brightness(1.2); }
.kap button.on { color: #ffd36b; }
.updn { display: flex; flex-direction: column; gap: 1px; }
.updn button { height: 12px; min-width: 30px; font-size: 6.5px; }
.kap .rknob { top: 16px; right: 24px; }
.kap .rknob.small { top: 26px; right: 34px; }
/* trainer.html?embed=2: only the bezel, filling the dashboard's iframe */
body.embed { background: transparent; overflow: hidden; }
body.embed header, body.embed .lesson, body.embed .gnsnote, body.embed .g5col, body.embed .annrow, body.embed .kap { display: none; }
body.embed main { padding: 0; display: block; }

/* KAP 140 on the trainer page (the cockpit's KAP has its own knobs) */
.kapd .alert { font-size: 7px; display: block; text-align: right; min-height: 7px; }
.kap button:disabled { opacity: .6; }
.kapr { position: absolute; left: 318px; top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* menu (index.html) */
.menupage { min-height: 100vh; display: grid; place-items: center; }
.menu { display: block; width: min(760px, 100% - 32px); padding: 40px 0; }
.mhead { margin-bottom: 22px; }
.mhead h1 { font-size: 34px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
.mhead p { margin: 0; }
.mnext { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 14px; background: linear-gradient(135deg, #16496e, #123751); color: #fff; text-decoration: none; box-shadow: 0 6px 18px #0007; transition: filter .15s, transform .15s; }
.mnext:hover, .mnext:focus-visible { filter: brightness(1.15); transform: translateY(-1px); outline: none; }
.mnt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mnt small { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #9ed8ff; }
.mnt b { font-size: 19px; font-weight: 650; }
.mnext .mgo { color: #fff; font-size: 24px; }
.mgroup { margin-top: 28px; }
.mgroup h2 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mlist { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mcard { display: flex; align-items: center; gap: 16px; padding: 16px 6px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background .15s, padding .15s; }
.mcard:hover, .mcard:focus-visible { background: var(--panel); padding-left: 14px; outline: none; }
.mnum { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 14px/1 GNS, system-ui, sans-serif; color: var(--accent); background: #24384a; }
.mtxt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mtxt b { font-size: 17px; font-weight: 600; }
.mtxt .muted, .mtile .muted { font-size: 13px; line-height: 1.4; }
.mdone { font-style: normal; font-size: 12px; color: var(--ok); }
.mdone:empty { display: none; }
.mgo { color: var(--muted); font-size: 18px; transition: transform .15s, color .15s; }
.mcard:hover .mgo, .mcard:focus-visible .mgo { color: var(--accent); transform: translateX(4px); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.mtile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .12s, transform .12s; }
.mtile:hover, .mtile:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.mtile b { font-weight: 600; }
.mfoot { margin: 28px 0 0; font-size: 12px; }
.mlist + .mgrid { margin-top: 10px; }
.mgroup > h2 { font-size: 15px; color: var(--accent); }
header .hlink { color: var(--muted); text-decoration: none; }
header .hlink:hover { color: var(--text); }

/* ---------- lesson slides ---------- */
.xh small { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.xh h3 { margin: 2px 0 6px; font-size: 15px; line-height: 1.25; }
.xdots { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; }
.xdots i { flex: 0 1 18px; min-width: 4px; height: 4px; border-radius: 2px; background: #3a4048; }
.xdots i.p { background: var(--ok); } .xdots i.c { background: var(--accent); }
.xb { line-height: 1.45; }
.xb .brief { margin: 0 0 8px; }
.xt { margin: 6px 0; font-size: 1.03em; }
.xt b, .brief b { color: #fff; }
.xfig { margin: 2px 0 8px; }
.xfig .fp { display: block; width: 100%; max-width: 260px; margin: 0 auto; height: auto; background: #0b0e12; border-radius: 8px; font-family: system-ui, sans-serif; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: flex-start; width: 100%; }
.frow .fp { flex: 1 1 130px; max-width: 170px; margin: 0; }
.fg { margin: 0; text-align: center; }
.fg canvas { display: block; margin: 0 auto; }
.fg figcaption { font-size: .86em; color: var(--muted); margin-top: 2px; }
.fg.ph img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.feq { margin: 6px 0; padding: 5px 8px; border-radius: 6px; background: #12161b; font: 600 1.02em ui-monospace, Menlo, monospace; color: #ffe27a; text-align: center; }
.ftip { margin: 6px 0; padding: 5px 8px; border-left: 3px solid var(--warn); background: #2a2415; border-radius: 0 6px 6px 0; font-size: .95em; }
.flamp { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--c); color: #000; font-weight: 700; font-size: .9em; box-shadow: 0 0 8px var(--c); }
.fk { display: inline-block; padding: 0 5px; border-radius: 4px; background: #3a3f46; border: 1px solid #000; font: 700 .86em system-ui; color: #fff; }
.xtag { display: inline-block; margin-bottom: 4px; padding: 1px 7px; border-radius: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.xtag.try { background: #17331f; color: var(--ok); }
.xtag.ex { background: #2a2415; color: var(--warn); }
.xwhy { margin: 8px 0; padding: 7px 9px; background: #1c2a36; border-radius: 8px; font-size: .96em; }
.xwhy b { display: block; color: var(--accent); font-size: .86em; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 2px; }
.xlab { margin: 8px 0 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.xuses { display: flex; flex-direction: column; gap: 5px; }
.xuse { display: flex; gap: 8px; align-items: center; padding: 4px; background: #15181c; border-radius: 7px; }
.xuse img { flex: none; width: 64px; height: 42px; object-fit: contain; }
.xuse b { display: block; font-size: .95em; }
.xuse span { display: block; font-size: .9em; color: #c3c9d0; line-height: 1.3; }
.xcap { margin: 6px 0; padding: 6px 9px; min-height: 2.6em; background: #2a2415; border-radius: 8px; color: #ffe9b0; }
.xhud { margin: 6px 0; padding: 6px 9px; background: #12161b; border-radius: 8px; }
.xhud b { color: #fff; }
.xask { display: flex; gap: 6px; align-items: center; margin: 8px 0; }
.xask input { width: 90px; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line); background: #0e1114; color: #fff; font: 700 1.1em ui-monospace, monospace; }
.xask input:focus { outline: 2px solid var(--accent); }
.xask button, .xbtn { background: var(--accent); border: 0; border-radius: 8px; padding: 6px 12px; color: #001018; font-weight: 600; text-decoration: none; }
.xbtn { background: #2a2e33; color: var(--text); border: 1px solid var(--line); }
.xfb { margin: 6px 0; padding: 6px 9px; border-radius: 8px; }
.xfb.good { background: #17331f; color: #b5f2c9; }
.xfb.bad { background: #331b1b; color: #ffc9c9; }
.xfb.stuck { background: #2a2415; color: #ffe9b0; font-size: .92em; }
.xrow { justify-content: flex-start; align-items: center; }
.xrow .pri { margin-left: auto; }
.xrow .nudge { border-color: var(--warn) !important; box-shadow: 0 0 0 2px #ffb54755; }
.xdone .xbig { font-size: 34px; color: var(--ok); line-height: 1; }
.xrem { margin: 0 0 6px; padding-left: 18px; }
.xrem li { margin: 3px 0; }
.xlink a { color: var(--accent); }
.xflash { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 8px 16px; border-radius: 10px; background: #17331f; color: #b5f2c9; font-weight: 600; box-shadow: 0 6px 20px #000a; z-index: 60; }
.allx > summary { color: var(--muted); }
abbr.gl { text-decoration: underline dotted #7f8a96 1px; text-underline-offset: 3px; cursor: help; }
.glb { position: fixed; z-index: 70; max-width: 290px; padding: 8px 10px; border-radius: 8px; background: #0b0e12; border: 1px solid #3a4048; color: #e7e9ec; font: 13px/1.4 system-ui, sans-serif; box-shadow: 0 8px 24px #000c; pointer-events: none; }

.ftab { width: 100%; border-collapse: collapse; font-size: .95em; }
.ftab th { text-align: left; color: var(--muted); font-weight: 600; padding: 2px 6px; border-bottom: 1px solid var(--line); }
.ftab td { padding: 3px 6px; border-bottom: 1px solid #2a2e33; }
.fol { margin: 4px 0; padding-left: 20px; }
.fol li { margin: 3px 0; }
.fq { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--accent); background: #15181c; border-radius: 0 6px 6px 0; font-style: italic; }
.xask-b { background: var(--accent); border: 0; border-radius: 8px; padding: 7px 12px; color: #001018; font-weight: 700; }
.fsws { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.fsw { display: flex; gap: 8px; align-items: center; }

.cdiw .plate { display: none; }
.xstart { display: block; width: 100%; margin: 8px 0; padding: 10px 12px; text-align: left; border: 0; border-radius: 10px; background: linear-gradient(135deg, #16496e, #123751); color: #fff; font-weight: 600; }
.xstart small { display: block; font-size: 11px; font-weight: 500; color: #9ed8ff; letter-spacing: .04em; text-transform: uppercase; }

/* round instruments drawn on canvas (GI 106A, ADF), knob hot spot bottom left: used by the cockpit and the 430W trainer */
.gauge2 { display: block; width: 200px; height: 200px; filter: drop-shadow(0 3px 5px #000a); }
.gknob2 { position: absolute; left: 4px; top: 160px; width: 36px; height: 36px; border-radius: 50%; cursor: grab; touch-action: none; }
.gknob2:hover { background: #ffffff1c; }
/* main menu: two big tiles; a section shows when its tile is chosen (#instruments / #ifr) */
.menu .mgroup { display: none; }
.menu .mgroup:target { display: block; }
.menu:has(.mgroup:target) .mhome { display: none; }
.mhome { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.mbig { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); text-decoration: none; text-align: center; transition: border-color .12s, transform .12s; }
.mbig:hover, .mbig:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.mbig svg { width: 72px; height: 72px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mbig b { font-size: 24px; font-weight: 600; }
.mbig .muted { font-size: 13px; }
.mback { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; }
.mback:hover { color: var(--text); }
.mgroup .mnext { margin-bottom: 12px; }
