/* Maiden Flight: glass-cockpit theme.
 * Layout: sticky top bar, left instrument-panel nav, content column.
 * Amber = Pro, cyan = Plus/info, green = safety. Monospace = instrument labels and values. */
:root {
  color-scheme: dark;
  --bg: #08101c;
  --bg-2: #0d1828;
  --panel: #111f33;
  --panel-2: #16273f;
  --panel-hi: #1b3050;
  --line: #213552;
  --line-2: #2d4669;
  --text: #e8eef8;
  --muted: #8ea2bf;
  --dim: #5d7396;
  --accent: #f5a524;      /* instrument amber, Pro */
  --accent-ink: #1b1300;
  --accent-soft: rgba(245, 165, 36, .14);
  --plus: #3fcde6;        /* HUD cyan, Plus / info */
  --plus-ink: #00222a;
  --plus-soft: rgba(63, 205, 230, .10);
  --safe: #3ddc84;        /* safety green */
  --safe-soft: rgba(61, 220, 132, .10);
  --danger: #ff6b6b;
  --screen: #060d18;      /* radio LCD / code blocks */
  --screen-text: #cfe3ff;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 28px -18px rgba(0, 0, 0, .7);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "SF Pro Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.6 var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 85% -12%, rgba(63, 205, 230, .07), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(245, 165, 36, .04), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0; letter-spacing: -.012em; text-wrap: balance; }
code { font-family: var(--mono); font-size: .86em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
kbd { font: 600 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { color: var(--plus); font-weight: 600; }
.link:hover { text-decoration: underline; }
svg { flex: none; }

/* dev ribbon */
.dev-ribbon { display: none; background: repeating-linear-gradient(45deg, #3a2a00, #3a2a00 10px, #2a1f00 10px, #2a1f00 20px); color: var(--accent); font: 600 11px/1 var(--mono); letter-spacing: .08em; text-align: center; padding: 6px; }
.is-dev .dev-ribbon { display: block; }

/* ---------- top bar ---------- */
/* phones: keep the sticky bar clear of the notch, and paint the band above it */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); background: rgba(8, 16, 28, .86); backdrop-filter: blur(10px) saturate(1.2); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 600 19px/1 var(--display); letter-spacing: .01em; color: var(--text); flex: none; }
.brand b { color: var(--accent); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.search { position: relative; flex: 1; max-width: 420px; margin-left: 12px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input { padding: 9px 12px 9px 34px; background: var(--bg-2); border-radius: 999px; font-size: 14px; }
.search input::placeholder { color: var(--dim); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.tier-pill { font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); white-space: nowrap; }
.tier-pill.t-pro { color: var(--accent); border-color: rgba(245, 165, 36, .5); }
.tier-pill.t-plus { color: var(--plus); border-color: rgba(63, 205, 230, .45); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); max-width: 1280px; margin: 0 auto; }
.nav { position: sticky; top: 58px; align-self: start; display: flex; flex-direction: column; gap: 2px; padding: 22px 12px; max-height: calc(100vh - 58px); overflow-y: auto; scrollbar-width: thin; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a .ni { width: 18px; height: 18px; color: var(--dim); transition: color .15s; }
.nav a .nl { flex: 1; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a:hover .ni { color: var(--muted); }
.nav a.active { background: linear-gradient(90deg, var(--panel-hi), var(--panel-2)); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav a.active .ni { color: var(--accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-pro { background: var(--accent); } .dot-plus { background: var(--plus); } .dot-safe { background: var(--safe); box-shadow: 0 0 8px rgba(61, 220, 132, .6); }
.nav-group { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 18px 12px 7px; }
.nav-group:empty { padding: 8px 0 0; margin: 8px 12px 4px; border-top: 1px solid var(--line); }
.nav-tier { font: 600 9.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; }
.nav a.quiet { font-size: 13.5px; }
main { padding: 30px 28px 90px; min-width: 0; outline: none; }
.view-in { animation: viewIn .22s ease-out; }
@keyframes viewIn { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .nav { position: sticky; top: 57px; z-index: 10; flex-direction: row; overflow-x: auto; max-height: none; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .nav a { white-space: nowrap; gap: 7px; padding: 8px 10px; }
  .nav a .ni { display: none; }
  .nav a.active { box-shadow: inset 0 -2px 0 var(--accent); background: var(--panel-2); }
  .nav-group { display: none; }
  main { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
  .topbar { padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); gap: 10px; }
  .search { margin-left: 0; }
  .search kbd { display: none; }
  .brand span { display: none; }
}

/* ---------- page headers ---------- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.page-head h2 { font-size: 28px; font-weight: 650; }
.page-head .ph-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--accent); }
.page-head .ph-icon svg { width: 20px; height: 20px; }
.page-head .ph-aside { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lede { color: var(--muted); max-width: 70ch; margin: 6px 0 22px; font-size: 15.5px; }
.section { font: 600 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 30px 0 12px; display: flex; align-items: center; gap: 12px; }
.section .sec-count { color: var(--dim); letter-spacing: .04em; }
.section .progress { flex: 1; max-width: 180px; margin-left: auto; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--plus); margin-bottom: 14px; }

/* ---------- badges ---------- */
.badge { display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; vertical-align: middle; white-space: nowrap; }
.badge-free { color: var(--muted); border: 1px solid var(--line-2); }
.badge-pro { color: var(--accent); border: 1px solid rgba(245, 165, 36, .45); }
.badge-plus { color: var(--plus); border: 1px solid rgba(63, 205, 230, .4); }
.badge-safe { color: #04210f; background: var(--safe); }
.badge-dev { color: var(--accent); border: 1px dashed var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--font); padding: 11px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, transform .05s, color .15s; white-space: nowrap; }
.btn:hover { border-color: #3d5a86; background: var(--panel-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .pad:focus-visible { outline: 2px solid var(--plus); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #ffb53d; border-color: #ffb53d; }
.btn-plus { background: var(--plus); color: var(--plus-ink); border-color: var(--plus); }
.btn-plus:hover { background: #63dbf0; border-color: #63dbf0; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .08); }
.btn-danger:hover { background: rgba(255, 107, 107, .16); border-color: var(--danger); }
#copy-box { font: 12px/1.5 var(--mono); margin-top: 8px; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.row.end { justify-content: flex-end; }
.done-btn.is-done { color: var(--safe); border-color: rgba(61, 220, 132, .45); background: var(--safe-soft); }

/* ---------- cards ---------- */
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel) 70%); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; box-shadow: var(--shadow); min-width: 0; }
.card p { margin: 8px 0; }
.card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 4px; }
.card-head h3 { font-size: 16px; font-weight: 650; }
details.card { padding: 0; transition: border-color .15s; scroll-margin-top: 130px; }
.fine-wrap { margin: 4px 0 0; }
.fine-wrap summary { cursor: pointer; padding: 4px 0; }
.fine-wrap .fine { margin-top: 8px; }
details.card > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; padding: 15px 18px; border-radius: var(--radius); }
details.card > summary:hover { background: rgba(255, 255, 255, .015); }
details.card > :not(summary) { margin-left: 18px; margin-right: 18px; }
details.card > :last-child { margin-bottom: 16px; }
details.card[open] { border-color: var(--line-2); }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -3px 2px 0 0; flex: none; transition: transform .15s; }
details.card[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
details.card summary .badge { margin-left: auto; }
details.card summary small { font-weight: 500; }
details.card[open] > summary { padding-bottom: 6px; }
.sum-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.done-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--safe-soft); color: var(--safe); border: 1px solid rgba(61, 220, 132, .4); flex: none; }
.done-dot svg { width: 12px; height: 12px; }
.steps { margin: 8px 0 4px; padding-left: 24px; }
.steps li { margin: 7px 0; padding-left: 4px; max-width: 78ch; }
.steps li::marker { color: var(--accent); font: 700 13px var(--mono); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.grid2 > .card { margin-bottom: 0; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }

/* locked: one quiet muted line, no box, no button, no popups */
.locked { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin: 6px 0 10px; }
.locked svg { width: 13px; height: 13px; flex: none; opacity: .7; align-self: center; }
.locked a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.locked a:hover { color: var(--text); }

/* ---------- progress ---------- */
.progress { height: 6px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--safe), #7cf0b0); border-radius: 99px; transition: width .3s; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; padding: 8px 0 24px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 700; letter-spacing: -.025em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 17px; max-width: 52ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-instrument { display: flex; justify-content: center; }
.att { position: relative; width: 210px; height: 210px; border-radius: 50%; overflow: hidden; border: 7px solid #1a2a44; box-shadow: 0 0 0 2px var(--line-2), 0 0 0 9px #0c1626, 0 24px 50px -20px rgba(0, 0, 0, .8), inset 0 0 30px rgba(0,0,0,.6); }
.att-horizon { position: absolute; inset: -40%; animation: bank 9s ease-in-out infinite; }
.att-sky { position: absolute; inset: 0 0 50% 0; background: linear-gradient(#17609e, #3fa2d9); }
.att-ground { position: absolute; inset: 50% 0 0 0; background: linear-gradient(#8a5a2b, #5e3c1c); }
.att-horizon::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #fff; transform: translateY(-1px); }
.att-ticks { position: absolute; left: 50%; top: 50%; width: 60px; margin-left: -30px; }
.att-ticks i { position: absolute; left: 15px; right: 15px; height: 2px; background: rgba(255,255,255,.75); }
.att-ticks i:nth-child(1) { top: -32px; } .att-ticks i:nth-child(2) { top: -16px; left: 22px; right: 22px; } .att-ticks i:nth-child(3) { top: 16px; left: 22px; right: 22px; } .att-ticks i:nth-child(4) { top: 32px; }
.att-wings { position: absolute; left: 50%; top: 50%; width: 120px; height: 4px; margin-left: -60px; margin-top: -2px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 0 1px #000; }
.att-wings::after { content: ""; position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px #000; }
@keyframes bank { 0%, 100% { transform: rotate(-9deg) translateY(4px); } 50% { transform: rotate(7deg) translateY(-6px); } }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; } .hero-instrument { display: none; } }

.cockpit { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 820px) { .cockpit { grid-template-columns: 1fr; } }
.cockpit .card { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 10px; }
.stat-label { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.stat-value { font: 650 22px/1 var(--display); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.stat-value small { font: 500 13px var(--font); color: var(--muted); margin-left: 4px; }
.next-up { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.next-up .nu-label { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.next-up h3 { font-size: 16px; }

.safety-strip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(61, 220, 132, .32); background: var(--safe-soft); color: var(--text); margin: 4px 0 20px; }
.safety-strip svg { color: var(--safe); flex: none; margin-top: 2px; }
a.safety-strip:hover { background: rgba(61, 220, 132, .14); }
.tile { display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, transform .15s; box-shadow: var(--shadow); }
.tile:hover { border-color: #3d5a86; transform: translateY(-2px); }
.tile-head { display: flex; align-items: center; gap: 10px; }
.tile-head .ti { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); }
.tile-head .ti svg { width: 17px; height: 17px; }
.tile-head .badge { margin-left: auto; }
.tile h3 { font-size: 16px; font-weight: 650; }
.tile p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: var(--panel); }
.card .table-wrap { border: 0; margin: 0 -4px; background: transparent; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--bg-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .015); }
td code { white-space: nowrap; margin: 0 4px 4px 0; display: inline-block; }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.compare td.c, .compare th.c { text-align: center; width: 72px; }
.compare .yes { color: var(--safe); }
.compare .no { color: #3c5274; }
.compare .row-safe td:first-child::after { content: "Always free"; margin-left: 8px; font: 700 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--safe); }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.form h3 { font-size: 16px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 14px; }
label.inline { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
input, select, textarea { font: 14px var(--font); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px; width: 100%; transition: border-color .15s; }
input:hover, select:hover, textarea:hover { border-color: #3d5a86; }
label.inline select { width: auto; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
textarea { resize: vertical; }

.plane .card-head { justify-content: flex-start; }
.plane-icon { color: var(--accent); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); }
.plane-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.plane-specs span { font: 500 12px/1 var(--mono); color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.plane.editing { border-color: rgba(245, 165, 36, .5); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 10px 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* ---------- setup course & deep dive ---------- */
.radio-card .kv { margin-bottom: 0; }
.radio-card label.inline { margin-bottom: 6px; }
.level-blurb { margin: -6px 0 12px; }
.guide-meta { display: flex; gap: 8px; margin-bottom: 4px; }
.guide-meta span { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; }
.guide-h { font: 650 14px/1.3 var(--display); color: var(--accent); margin: 20px 0 2px; display: flex; align-items: center; gap: 8px; }
.guide-h::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.need, .check, .gotchas { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; margin: 12px 0; font-size: 14px; }
.need ul, .check ul, .gotchas ul { margin: 6px 0 0; padding-left: 18px; }
.check ul { list-style: none; padding-left: 0; }
.check li { display: flex; gap: 8px; margin: 4px 0; }
.check svg { color: var(--safe); flex: none; margin-top: 3px; }
.gotchas { border-color: rgba(245, 165, 36, .35); background: linear-gradient(180deg, rgba(245, 165, 36, .05), var(--bg-2)); }
.gotchas strong { color: var(--accent); }
.tip, .radio-note { font-size: 14px; padding: 9px 12px; border-left: 3px solid var(--plus); background: var(--plus-soft); border-radius: 0 8px 8px 0; margin: 10px 0; }
.tip strong, .radio-note strong { color: var(--plus); margin-right: 4px; }
.example { position: relative; font: 12.5px/1.6 var(--mono); background: var(--screen); border: 1px solid var(--line); border-radius: 10px; padding: 30px 14px 12px; overflow-x: auto; white-space: pre; color: var(--screen-text); margin: 12px 0; }
.example::before { content: "EdgeTX"; position: absolute; top: 9px; left: 14px; font: 700 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.guide-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips button { font: 600 12.5px/1 var(--font); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; transition: border-color .15s, color .15s; }
.chips button:hover { color: var(--text); }
.chips button.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.notes ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.notes li { margin: 6px 0; }
.notes li.warn { color: var(--text); }
.notes li.warn strong { color: var(--accent); margin-right: 4px; }

/* ---------- setup course: dropdown menus, contents, guide pages ---------- */
.course-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 18px; padding: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); position: relative; z-index: 12; }
.bar-sep { width: 1px; height: 28px; background: var(--line-2); margin: 0 2px; }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-btn { gap: 8px; padding: 9px 12px; }
.menu-btn svg { width: 16px; height: 16px; color: var(--muted); }
.menu-btn .chev { width: 14px; height: 14px; transition: transform .15s; }
details.menu[open] > .menu-btn { border-color: var(--accent); background: var(--panel-hi); }
details.menu[open] > .menu-btn .chev { transform: rotate(180deg); }
.menu-btn.has-current { border-color: rgba(245, 165, 36, .55); color: var(--accent); }
.menu-count { font: 600 11px/1 var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.menu-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px; box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .7); animation: menuIn .14s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-label { font: 600 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 8px 10px 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: 500 14px/1.35 var(--font); color: var(--text); background: transparent; border: 0; border-radius: 8px; padding: 9px 10px; cursor: pointer; min-height: 44px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--panel-hi); }
.menu-item.current { background: var(--accent-soft); color: var(--accent); }
.menu-item .badge { margin-left: auto; }
.mi-mark { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 700 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-2); background: var(--bg-2); }
.mi-mark:empty { border-style: dashed; }
.mi-mark.done { color: var(--safe); border-color: rgba(61, 220, 132, .45); background: var(--safe-soft); }
.mi-mark svg { width: 12px; height: 12px; }
.mi-text { display: flex; flex-direction: column; min-width: 0; }
.mi-text small { font: 500 11.5px/1.3 var(--mono); color: var(--dim); margin-top: 2px; }
.menu-kv { margin: 0; padding: 2px 10px 10px; font-size: 13px; }
.continue { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius); border: 1px solid rgba(245, 165, 36, .45); background: linear-gradient(90deg, var(--accent-soft), transparent); }
.continue strong { flex: 1; min-width: 180px; font-family: var(--display); font-size: 16px; }
.continue svg { color: var(--accent); }
.continue:hover { border-color: var(--accent); }
.continue .nu-label { flex-basis: 100%; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.toc-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 8px; box-shadow: var(--shadow); min-width: 0; }
.toc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.toc-head h3 { font-size: 17px; }
.toc-card > p { margin: 8px 0 4px; }
.toc-list { display: grid; gap: 1px; margin: 0 -6px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--plus); font-weight: 600; }
.guide-page { background: linear-gradient(180deg, var(--panel-2), var(--panel) 40%); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px 18px; box-shadow: var(--shadow); }
.guide-page .page-head h2 { font-size: 24px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.pager-link:hover { border-color: #3d5a86; }
.pager-link.next { text-align: right; }
.pager-link small { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pager-link span { font-weight: 600; }
@media (max-width: 640px) {
  .course-bar { flex-direction: column; align-items: stretch; gap: 6px; }
  .bar-sep { display: none; }
  details.menu > .menu-btn { width: 100%; justify-content: flex-start; }
  .menu-btn .chev { margin-left: auto; }
  .menu-panel { position: static; width: auto; max-height: none; margin-top: 6px; box-shadow: none; }
  .guide-page { padding: 16px 14px; }
  .pager { grid-template-columns: 1fr; }
}

/* hangar: equipment dropdown of checkboxes */
.equip-field { display: grid; gap: 6px; position: relative; z-index: 5; min-width: 0; }
details.equip { min-width: 0; }
details.equip > .menu-btn { max-width: 100%; overflow: hidden; }
.equip-label { font-size: 13px; color: var(--muted); font-weight: 600; }
details.equip > .menu-btn { width: 100%; justify-content: flex-start; background: var(--bg-2); font-weight: 500; }
details.equip > .menu-btn .chev { margin-left: auto; }
.equip-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: left; }
details.equip .menu-panel { width: min(420px, calc(100vw - 32px)); }
.equip-item { cursor: pointer; }
@media (max-width: 640px) { details.equip .menu-panel { width: auto; } }
.equip-item input { flex: none; }

/* setup diagrams (js/data/figures.js) */
.fig { margin: 12px 0 14px; padding: 12px; background: var(--screen); border: 1px solid var(--line); border-radius: var(--radius); max-width: 640px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* radios */
.fig-radio { max-width: 720px; }
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.radio-tile { display: block; padding: 14px 16px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.radio-tile:hover { border-color: #3d5a86; transform: translateY(-2px); }
.radio-tile.current { border-color: rgba(61, 220, 132, .5); }
.radio-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.radio-tile h3 { font-size: 16px; }
.radio-tile p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.sw-table td { padding: 6px 8px; }
.notes-list { margin: 6px 0 10px; padding-left: 18px; font-size: 14px; }
.notes-list li { margin: 6px 0; }

/* ---------- search ---------- */
.results { display: grid; gap: 8px; }
.result { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; transition: border-color .15s, background .15s; }
.result:hover { border-color: #3d5a86; background: var(--panel-2); }
.result-top { display: flex; align-items: center; gap: 10px; }
.result-kind { font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--plus); }
.result-top .badge { margin-left: auto; }
.result h3 { font-size: 15.5px; margin: 6px 0 4px; }
.result p { margin: 0; color: var(--muted); font-size: 14px; }
.result mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------- diagnostics ---------- */
.diag { margin-top: 12px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.diag-head { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--plus); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.diag-trail { font: 500 12px/1.4 var(--mono); color: var(--dim); margin-bottom: 8px; }
.diag-q { font-weight: 600; margin-bottom: 10px; }
.diag-btns { display: flex; gap: 8px; }
.diag-answer { display: flex; gap: 8px; color: var(--text); margin-bottom: 10px; }
.diag-answer svg { color: var(--safe); flex: none; margin-top: 3px; }
.diag .locked { margin: 0; }

/* ---------- config sheet ---------- */
.sheet { font: 12.5px/1.6 var(--mono); background: var(--screen); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; white-space: pre; color: var(--screen-text); max-height: 380px; }
.etx { border: 1px solid rgba(245, 165, 36, .4); background: linear-gradient(180deg, var(--accent-soft), transparent 70%); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0 16px; }
.etx-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.etx-head > div:first-child { flex: 1; min-width: 240px; }
.etx h4 { font-size: 15px; color: var(--accent); }
.etx-how { margin-top: 10px; }
.etx-how summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--plus); }
.sheet-h { font-size: 14px; margin: 4px 0 8px; color: var(--muted); }
.cfg-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cfg-inline input, .cfg-inline select { width: auto; }
.cfg-inline input[type="number"] { width: 84px; }

/* ---------- simulator ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .sim { grid-template-columns: 1fr; } }
.sim-radio { background: linear-gradient(#1a2b45, #0f1c30); border: 1px solid var(--line-2); border-radius: 22px; padding: 18px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04); }
.sim-radio-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sim-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sw-name { font: 600 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.seg, .period { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button, .period button { flex: 1; font: 600 12.5px/1 var(--font); color: var(--muted); background: transparent; border: 0; padding: 8px 6px; border-radius: 6px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.sim-sticks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 460px) { .sim-sticks { grid-template-columns: 1fr; } }
.gimbal { display: grid; gap: 8px; justify-items: center; }
.gimbal-label { font: 600 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.pad { position: relative; width: 100%; max-width: 190px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #1d3352, #0b1626 72%); border: 1px solid var(--line-2); box-shadow: inset 0 4px 16px rgba(0,0,0,.6), 0 0 0 6px #0d1829, 0 0 0 7px var(--line); touch-action: none; cursor: grab; }
.pad:active { cursor: grabbing; }
.pad::before, .pad::after { content: ""; position: absolute; background: rgba(142, 162, 191, .18); }
.pad::before { left: 50%; top: 10%; bottom: 10%; width: 1px; }
.pad::after { top: 50%; left: 10%; right: 10%; height: 1px; }
.pad-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd27a, var(--accent) 55%, #b6740a); box-shadow: 0 4px 10px rgba(0,0,0,.6), 0 0 0 3px rgba(245, 165, 36, .18); z-index: 1; transition: left .12s ease-out, top .12s ease-out; }
.pad.dragging .pad-dot { transition: none; }
.pad-read { font: 600 12px/1 var(--mono); color: var(--screen-text); font-variant-numeric: tabular-nums; }
.pad-read span { color: var(--dim); }
.fine { display: grid; gap: 6px; width: 100%; }
.slider { font-size: 12px; }
.slider input { padding: 0; accent-color: var(--accent); background: transparent; border: 0; }
.sim-out { background: var(--screen); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.sim-out-head { font: 600 12px/1 var(--mono); color: var(--plus); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; display: flex; justify-content: space-between; }
.sim-out-head span { color: var(--dim); }
.chan { display: grid; grid-template-columns: 124px 1fr 92px; gap: 10px; align-items: center; margin: 9px 0; font: 13px var(--mono); }
.chan-label span { color: var(--muted); }
.chan-bar { position: relative; height: 12px; background: #0f1b2e; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.chan-fill { position: absolute; top: 0; bottom: 0; background: var(--plus); transition: left .08s, width .08s; }
.chan.held .chan-fill { background: var(--safe); }
.chan-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.chan-val { text-align: right; font-variant-numeric: tabular-nums; }
.chan-val small { color: var(--muted); }
.sim-voice { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.sim-voice strong { color: var(--plus); }
.sim-note { display: flex; gap: 8px; align-items: center; color: var(--safe); font-size: 13px; margin: 12px 0 0; }
@media (max-width: 520px) { .chan { grid-template-columns: 92px 1fr 54px; font-size: 12px; } .chan-val small { display: none; } }

/* ---------- plans ---------- */
.plans-head { text-align: center; max-width: 720px; margin: 8px auto 26px; }
.plans-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.plans-head .lede { margin: 10px auto 0; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin-bottom: 18px; }
@media (max-width: 980px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; } }
.plan { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.plan-pro { border-color: rgba(245, 165, 36, .5); }
.plan-plus { border-color: rgba(63, 205, 230, .38); }
.plan-top { display: flex; align-items: center; justify-content: space-between; min-height: 26px; }
.plan h3 { font-size: 18px; }
.plan-pro h3 { color: var(--accent); } .plan-plus h3 { color: var(--plus); }
.tag, .current { font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; }
.tag { background: var(--accent-soft); color: var(--accent); }
.tag-plus { background: var(--plus-soft); color: var(--plus); }
.current { background: var(--safe-soft); color: var(--safe); }
.price { font: 700 36px/1.1 var(--display); margin-top: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.price-note { color: var(--muted); font-size: 13px; margin-top: 4px; }
.period { margin-top: 14px; }
.period button.on { background: var(--plus); color: var(--plus-ink); }
.period em { font-style: normal; font-size: 11px; opacity: .8; }
.plan-inc { font-size: 13px; color: var(--muted); margin: 16px 0 0; font-weight: 600; }
.incl { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.incl li { display: flex; gap: 8px; font-size: 14px; }
.incl svg { flex: none; margin-top: 3px; color: var(--safe); }
.plan-pro .incl svg { color: var(--accent); } .plan-plus .incl svg { color: var(--plus); }
.terms { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.terms h4 { font-size: 14px; margin-bottom: 8px; }
.terms ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.terms li { margin: 6px 0; }
.terms strong { color: var(--text); }

/* ---------- modal & toast ---------- */
.sheet-modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 8, 15, .7); backdrop-filter: blur(3px); }
.sheet-modal.open { display: flex; }
.modal { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.modal p { color: var(--muted); font-size: 14px; }
.dev-note { color: var(--accent) !important; font-family: var(--mono); font-size: 12px !important; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--panel-hi); border: 1px solid var(--line-2); padding: 12px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.dev { border-style: dashed; border-color: rgba(245, 165, 36, .5); margin-top: 16px; }

/* ---------- print: setup sheet only ---------- */
@media print {
  body.print-sheet * { visibility: hidden; }
  body.print-sheet #sheet, body.print-sheet #sheet * { visibility: visible; }
  body.print-sheet #sheet { position: absolute; left: 0; top: 0; max-height: none; overflow: visible; background: #fff; color: #000; border: 0; font-size: 11pt; white-space: pre-wrap; }
}

/* touch screens: comfortable tap targets (at least 40px) */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm, .chips button, .seg button, .period button { min-height: 40px; }
  .nav a { min-height: 40px; }
  details.card > summary { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
