:root { --ink:#1f2933; --mut:#6b7684; --line:#dfe3e8; --bg:#f6f7f9; --blue:#2f6db5; --orange:#e08a1e; --red:#d1453b; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fff; }
button { font: inherit; border: 1px solid #c8cdd4; background: #fff; border-radius: 6px; padding: 5px 10px; cursor: pointer; color: inherit; }
button:hover:not(:disabled) { background: #f0f3f7; }
button:disabled { opacity: .4; cursor: not-allowed; }
input[type=number], select { width: 100%; padding: 6px 7px; border: 1px solid #c8cdd4; border-radius: 6px; font: inherit; background: #fff; }
input[type=range] { width: 100%; }

/* ---------------- shell: sidebar + content ---------------- */
:root { --navy: #0f1b2d; --navy2: #172740; }
body { background: #f4f6fa; }
#shell { display: flex; height: 100vh; }
#side { width: 256px; flex: none; background: var(--navy); color: #c5d0e2; display: flex; flex-direction: column; padding: 14px 12px; transition: width .18s ease; z-index: 30; overflow: hidden; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 18px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; min-width: 0; }
.logo img { flex: none; border-radius: 8px; }
#side button#sideToggle { border: 0; background: transparent; color: #9fb0cb; padding: 6px; border-radius: 8px; flex: none; }
#side button#sideToggle:hover { background: rgba(255,255,255,.1) !important; color: #fff; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c5d0e2; text-decoration: none; font-weight: 600; white-space: nowrap; }
a.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
a.nav.on { background: var(--blue); color: #fff; }
.ico { width: 22px; height: 22px; flex: none; }
.soon { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: #f6c445; color: #2b2f36; padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; padding: 12px; font-size: 12px; line-height: 1.5; color: #8497b6; white-space: nowrap; }
.side-foot small { color: #61738f; }
body.compact #side { width: 68px; padding: 14px 10px; }
body.compact .lbl { display: none; }
body.compact .side-top { flex-direction: column; gap: 10px; }
body.compact a.nav { justify-content: center; padding: 11px 0; }
#content { flex: 1; min-width: 0; height: 100vh; overflow: auto; position: relative; }

/* ---------------- pages (home, feedback, quadrotor) ---------------- */
.page { max-width: 1080px; margin: 0 auto; padding: 36px 32px 24px; }
.page h1 { font-size: 40px; line-height: 1.1; margin: 10px 0 14px; letter-spacing: -.01em; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; padding: 18px 0 34px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; color: #2f6db5; background: #e4eefb; padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: 52px; }
.hero h1 span { color: var(--blue); }
.hero p { font-size: 17px; color: var(--mut); margin: 0 0 24px; max-width: 520px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; } .cta.center { justify-content: center; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; border: 1px solid #c8cdd4; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; font-size: 15px; cursor: pointer; font-family: inherit; }
.btn:hover { background: #f0f3f7; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; width: auto; margin: 0; padding: 11px 20px; }
.btn.primary:hover { background: #265a98; }
.hero-img { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px; box-shadow: 0 12px 40px rgba(30,60,110,.12); }
.hero-img img { display: block; width: 100%; height: auto; border-radius: 14px; }
.block { padding: 18px 0 14px; }
.block h2 { font-size: 22px; margin: 0 0 14px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.st { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.st b { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 15px; }
.st h3 { margin: 10px 0 4px; font-size: 18px; } .st p { margin: 0; color: var(--mut); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(30,60,110,.14); border-color: #b9cde8; }
.card h3 { margin: 0 0 6px; font-size: 19px; } .card p { margin: 0 0 14px; color: var(--mut); flex: 1; }
.card .go { font-weight: 700; color: var(--blue); }
.card.off { background: #fafbfc; } .card.off h3, .card.off p { opacity: .6; } .card.off .go { color: #8a94a1; }
.ribbon { position: absolute; top: 14px; right: -8px; z-index: 1; background: repeating-linear-gradient(-45deg, #f6c445 0 10px, #2b2f36 10px 20px);
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 12px; border-radius: 4px 0 0 4px;
  text-shadow: 0 0 3px #000, 0 0 3px #000; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.ribbon.static { position: static; display: inline-block; border-radius: 4px; }
.foot { margin-top: 30px; padding: 18px 0 8px; border-top: 1px solid var(--line); color: #8a94a1; font-size: 12.5px; text-align: center; }
.foot a { color: var(--blue); }
.narrow { max-width: 640px; margin: 0 auto; } .narrow.center { text-align: center; padding-top: 40px; }
.lead { font-size: 17px; color: var(--mut); margin: 0 0 22px; }

/* ---- feedback form ---- */
.fbform { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 4px 18px rgba(30,60,110,.06); }
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; } .field small { font-weight: 400; color: var(--mut); }
.fbform textarea, .fbform input[type=text], .fbform input[type=email] { width: 100%; padding: 10px 12px; border: 1px solid #c8cdd4; border-radius: 10px; font: inherit; background: #fff; }
.fbform textarea { resize: vertical; min-height: 120px; }
.fbform textarea:focus, .fbform input:focus { outline: 2px solid #9db6d6; border-color: var(--blue); }
.fbform .seg { margin-bottom: 0; } .fbform .seg label { padding: 9px 4px; font-size: 13.5px; }
.hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); margin-top: 4px; }
.err { color: var(--red); font-weight: 600; font-size: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fbform .btn.primary { width: 100%; padding: 12px; margin-top: 4px; }
.fbform .btn.primary:disabled { opacity: .6; cursor: wait; }
.fbstatus { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.fbstatus.ok { background: #e6f5ec; color: #14592f; } .fbstatus.bad { background: #fbe9e7; color: #8f2a22; }
.fine { color: #8a94a1; font-size: 12px; margin: 12px 0 0; }

/* ---------------- designer ---------------- */
#designer, #qmain { display: grid; grid-template-columns: 400px minmax(0, 1fr); height: 100vh; min-height: 560px; }
#qdesigner { display: flex; flex-direction: column; height: 100vh; min-height: 560px; background: #fff; }
#qmain { flex: 1; height: auto; min-height: 0; }
#panel, #qpanel { overflow-y: auto; padding: 14px 16px 28px; background: var(--bg); border-right: 1px solid var(--line); }
#panel h1, #qpanel h1 { font-size: 18px; margin: 6px 0 2px; }
.back { font-size: 12.5px; color: var(--blue); text-decoration: none; }
.back:hover { text-decoration: underline; }
.sub { color: var(--mut); margin: 0 0 12px; font-size: 12px; }
#panel section, #qpanel section { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; margin-bottom: 11px; }
#panel section h2, #qpanel section h2 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 0 0 9px; }
.note { color: var(--mut); font-size: 12px; margin: 8px 0 0; }
.note.top { margin: 0 0 9px; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 42px; height: 42px; font-size: 22px; line-height: 1; padding: 0; border-radius: 50%; }
#dofPlus { background: var(--blue); border-color: var(--blue); color: #fff; }
#dofPlus:hover:not(:disabled) { background: #265a98; }
#dofNum { min-width: 40px; text-align: center; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }

.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.lk { display: grid; grid-template-columns: 1fr 74px; gap: 6px; align-items: center; font-weight: 600; font-size: 12.5px; }
.lk small { display: block; font-weight: 400; font-size: 10.5px; color: var(--mut); }
input.bad { border-color: var(--red); background: #fdf1f0; }

.jc { border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; margin-bottom: 8px; background: #fbfcfd; }
.jc.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(47,109,181,.55); background: #eaf1fb; } 100% { box-shadow: 0 0 0 0 rgba(47,109,181,0); background: #fbfcfd; } }
.jh { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; }
.jh b { color: var(--blue); }
.dir { display: flex; border: 1px solid #c8cdd4; border-radius: 6px; overflow: hidden; }
.dir button { border: 0; border-radius: 0; width: 34px; padding: 5px 0; font-weight: 700; background: #fff; }
.dir button.on { background: var(--blue); color: #fff; }
.jr { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; margin-top: 6px; }
.jr output, .grow output { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; text-align: right; }
.grow { display: grid; grid-template-columns: 58px 1fr 48px; gap: 8px; align-items: center; }
.ghost { width: 100%; font-size: 12.5px; color: var(--mut); }
.opts label { display: inline-flex; gap: 6px; align-items: center; margin-right: 14px; margin-bottom: 5px; font-size: 13px; }

#stage { position: relative; min-width: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; background: #fff; }
#cv:active { cursor: grabbing; }
#info { position: absolute; left: 12px; top: 10px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.88); font-size: 12.5px; font-weight: 600; pointer-events: none; }
#info:empty { display: none; }
#empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#empty div { text-align: center; background: rgba(255,255,255,.9); border: 1px dashed #b7bec9; border-radius: 12px; padding: 16px 24px; max-width: 320px; }
#empty b { display: block; font-size: 16px; margin-bottom: 4px; }
#empty span { color: var(--mut); }
.zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.zoom button { width: 32px; height: 32px; padding: 0; font-size: 16px; }
#hint { position: absolute; left: 12px; bottom: 10px; color: var(--mut); font-size: 11.5px; pointer-events: none; }

/* ---- steps, tabs, test panel ---- */
.steps { display: flex; gap: 6px; margin: 8px 0 2px; font-size: 11.5px; }
.steps span { padding: 2px 9px; border-radius: 999px; background: #e9edf2; color: var(--mut); font-weight: 600; }
.steps span.on { background: var(--blue); color: #fff; }
.stepper .of { color: var(--mut); font-size: 12px; margin-right: auto; }
.note.max { color: #b45309; font-weight: 600; }
.note.center { text-align: center; }
button.primary { width: 100%; background: var(--blue); border-color: var(--blue); color: #fff; padding: 9px; font-weight: 600; margin-top: 4px; }
button.primary:hover:not(:disabled) { background: #265a98; }
button.primary:disabled { background: #9db6d6; border-color: #9db6d6; opacity: 1; }
.tabs { display: flex; gap: 4px; margin: 6px 0 10px; border-bottom: 1px solid var(--line); }
.tb { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 7px 10px; font-weight: 600; color: var(--mut); }
.tb:hover { background: none !important; color: var(--ink); }
.tb.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab { display: none; } .tab.on { display: block; }
.fr { display: grid; grid-template-columns: 26px 30px 1fr 62px; gap: 6px; align-items: center; margin: 4px 0; }
.fr b { color: var(--blue); } .fr small { color: var(--mut); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
.fr input[type=number] { padding: 3px 5px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; text-align: right; }
.ef { margin-top: 10px; padding: 9px 10px; border-radius: 8px; background: #eef4fb; border: 1px solid #d3e2f5; }
.eft { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #3b5f8c; margin-bottom: 6px; }
.efg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 8px; }
.efg label { display: block; font-size: 11px; color: var(--mut); }
.efg output { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; font-weight: 600; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.row3 label { font-size: 11px; color: var(--mut); display: block; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 9px; }
.seg label { flex: 1; text-align: center; padding: 6px 4px; cursor: pointer; font-size: 12px; background: #fff; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--blue); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.chips button { font-size: 11.5px; padding: 3px 8px; }
.status { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #eef1f5; font-size: 12.5px; }
.status.ok { background: #e6f5ec; color: #14592f; }
.status.err { background: #fbe9e7; color: #8f2a22; }
.status small { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
table.jt { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
table.jt th { text-align: right; font-size: 10.5px; color: var(--mut); font-weight: 600; padding: 3px 4px; border-bottom: 1px solid var(--line); }
table.jt td { text-align: right; padding: 3px 4px; border-bottom: 1px solid #eef0f3; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; }
table.jt th:first-child, table.jt td:first-child { text-align: center; font-weight: 600; font-family: inherit; }
table.jt tr.tl td { color: #8a94a1; font-size: 11px; }
.mat { margin: 0 0 12px; }
.mat .mt { font-size: 12px; margin-bottom: 3px; } .mat .mt b { font-size: 13px; } .mat .mt span { color: var(--mut); font-size: 11px; }
.m4 { display: grid; grid-template-columns: repeat(4, 1fr); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; border-left: 2px solid #8a94a3; border-right: 2px solid #8a94a3; border-radius: 4px; padding: 3px 4px; background: #fafbfc; }
.m4 i { font-style: normal; text-align: right; padding: 1px 5px; }
.m4 i.p { color: #1b5e9e; background: #eaf2fb; } .m4 i.z { color: #a7afb9; }

@media (max-width: 900px) {
  #shell { flex-direction: column; height: auto; min-height: 100vh; }
  #side, body.compact #side { width: auto; flex-direction: row; align-items: center; padding: 8px 12px; position: sticky; top: 0; }
  .side-top, body.compact .side-top { flex: 1; flex-direction: row; margin: 0; }
  .side-foot { display: none; }
  .nav-list { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 6px 12px 14px; box-shadow: 0 12px 24px rgba(0,0,0,.25); }
  body.menu .nav-list { display: flex; }
  body.compact .lbl { display: inline; } body.compact a.nav { justify-content: flex-start; padding: 10px 12px; }
  #content { height: auto; overflow: visible; }
  .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 38px; } .page h1 { font-size: 32px; }
  .steps3, .cards, .two { grid-template-columns: 1fr; }
  #designer, #qmain { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  #qdesigner { height: auto; }
  #stage, #qstage, #qbstage { order: -1; min-height: 55vh; }
  #panel, #qpanel { border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
}

table.jt td.w { text-align: left; white-space: normal; font-family: inherit; color: var(--mut); font-size: 11px; }

/* ---- checks, alerts, solutions ---- */
.chk { padding: 8px 0; border-top: 1px solid #eef0f3; } .chk:first-of-type { border-top: 0; padding-top: 0; }
.cl { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #e6f5ec; color: #14592f; }
.badge.near { background: #fdf0d8; color: #8a5300; } .badge.bad { background: #fbe1de; color: #9b2218; }
.gauge { display: grid; grid-template-columns: 58px 1fr 120px; gap: 8px; align-items: center; font-size: 12px; margin: 3px 0; }
.gauge .bar { height: 8px; border-radius: 4px; background: #e9edf2; overflow: hidden; } .gauge .bar i { display: block; height: 100%; background: #1b9e5a; width: 0; }
.gauge.near .bar i { background: #e0a21e; } .gauge.bad .bar i { background: #c026d3; }
.gauge output { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; text-align: right; color: var(--mut); }
details.how { margin-top: 8px; font-size: 12px; color: var(--mut); } details.how summary { cursor: pointer; font-weight: 600; } details.how p { margin: 6px 0 0; }
.grow.mt { margin: 8px 0 4px; grid-template-columns: 74px 1fr 48px; }
.chkline { display: flex; gap: 6px; align-items: center; font-size: 12.5px; margin: 4px 0 6px; }
#alerts { position: absolute; left: 12px; top: 44px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; max-width: 70%; }
#alerts div { padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.92); border-left: 4px solid; }
#alerts .c { border-color: #d1453b; color: #9b2218; } #alerts .s { border-color: #c026d3; color: #86198f; } #alerts .n { border-color: #e0a21e; color: #8a5300; }
#ikSols { margin-top: 8px; }
.sol { display: block; width: 100%; text-align: left; margin-bottom: 5px; padding: 6px 8px; font-size: 12px; }
.sol.sel { border-color: var(--blue); background: #eaf1fb; }
.sol small { display: block; color: var(--mut); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; margin-top: 2px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; margin-left: 4px; background: #e6f5ec; color: #14592f; }
.tag.c { background: #fbe1de; color: #9b2218; } .tag.s { background: #f6dcf9; color: #86198f; } .tag.n { background: #fdf0d8; color: #8a5300; }

h3.sh { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 4px 0 6px; }

.note.bad { color: var(--red); font-weight: 600; }

.hero h1 span { color: var(--blue); }

/* ---- embedded feedback form ---- */
.fbframe { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 18px rgba(30,60,110,.06); }
.fbframe iframe { display: block; width: 100%; height: 900px; border: 0; }
.fine a { color: var(--blue); }
@media (max-width: 600px) { .fbframe iframe { height: 1000px; } }

/* ---- legal page, footer links, notes ---- */
.legal h2 { font-size: 20px; margin: 26px 0 8px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.legal p, .legal li { color: #3d4a5c; line-height: 1.6; }
.legal ul { padding-left: 20px; } .legal li { margin-bottom: 8px; }
.legal a { color: var(--blue); }
.side-foot a { color: #b9c7de; text-decoration: none; } .side-foot a:hover { color: #fff; text-decoration: underline; }
.foot a { color: var(--blue); }
.warn-note { margin: -4px 0 10px; padding: 6px 9px; background: #fff7e0; border-radius: 6px; color: #6b5200; font-size: 12px; }
.warn-note a { color: #6b5200; font-weight: 700; }

/* ---- ribbon cards: leave room for the ribbon ---- */
.card.off { padding-top: 46px; }
/* ---- 3D print notice in designer ---- */
.printsec { background: #f3f6fb !important; border-style: dashed !important; }
.printsec .na { margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #e6e9ee; color: #5b6573; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.printsec .btn { display: block; text-align: center; margin-top: 10px; padding: 9px 12px; font-size: 14px; }

/* ================= quadrotor designer ================= */
#qstage { position: relative; min-width: 0; background: #cfe3f5; overflow: hidden; }
#qcv, #qov { position: absolute; inset: 0; width: 100%; height: 100%; }
#qcv { touch-action: none; cursor: grab; outline: none; } #qcv:active { cursor: grabbing; }
#qov { pointer-events: none; }
#qhud { position: absolute; left: 12px; top: 10px; padding: 6px 11px; border-radius: 8px; background: rgba(255,255,255,.9); font-size: 12.5px; line-height: 1.5; font-variant-numeric: tabular-nums; pointer-events: none; max-width: 70%; }
#qhud b { font-weight: 700; } #qhud:empty { display: none; } #qhud .dim { color: var(--mut); }
#qhint { position: absolute; left: 12px; bottom: 10px; color: #4d5b6c; font-size: 11.5px; pointer-events: none; text-shadow: 0 0 4px #fff, 0 0 4px #fff; }
#qtoast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: #fff3d6; border: 1px solid #e3b341; color: #6b4a00; padding: 8px 14px; border-radius: 10px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.15); max-width: 80%; text-align: center; }
#qnogl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #eef2f7; padding: 20px; text-align: center; }
#qnogl b { display: block; font-size: 16px; margin-bottom: 6px; } #qnogl span { color: var(--mut); max-width: 380px; display: block; }
.qrow { display: grid; grid-template-columns: 1fr 92px; gap: 3px 10px; align-items: center; margin-bottom: 10px; }
.ql { grid-column: 1 / -1; font-size: 12.5px; margin-bottom: 3px; } .ql small { color: var(--mut); margin-left: 6px; font-size: 11px; }
.qn { display: flex; align-items: center; gap: 4px; } .qn input { text-align: right; padding: 5px 6px; } .qn em { font-style: normal; color: var(--mut); font-size: 11.5px; min-width: 18px; }
label.chk { display: flex; gap: 7px; align-items: center; font-size: 12.5px; margin: 0 0 10px; cursor: pointer; }
.info { background: #f1f5fa; border-radius: 6px; padding: 7px 9px; font-size: 12px; color: #3d4a5c; line-height: 1.55; margin-top: 4px; }
.info .ok { color: #15803d; font-weight: 600; } .info .warn { color: #b45309; font-weight: 700; } .info .bad { color: var(--red); font-weight: 700; }
.sensor { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 7px; cursor: pointer; }
.sensor:has(input:checked) { border-color: #9db6d6; background: #f3f8ff; } .sensor input { margin-top: 3px; }
.sensor span { display: flex; flex-direction: column; line-height: 1.3; } .sensor small { color: var(--mut); font-size: 11.5px; }
.btnrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .btnrow button { padding: 6px 2px; font-weight: 600; }
button.mini { font-size: 12px; padding: 4px 9px; margin-top: 8px; }
.qprog { height: 6px; background: #e3e8ef; border-radius: 99px; overflow: hidden; margin-top: 8px; } .qprog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f6db5, #52a3f0); transition: width .1s; }
#qs2 .two, #qs1 .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.pid h2 { display: flex; justify-content: space-between; align-items: center; } .pid h2 .pm { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11.5px; color: #15803d; }
.pid .qrow { grid-template-columns: 28px 1fr 74px; margin-bottom: 6px; } .pid .ql { grid-column: auto; margin: 0; font-weight: 700; } .pid .qn em { display: none; }
.pid canvas { display: block; width: 100%; height: 86px; margin-top: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.pid .units { color: var(--mut); font-size: 10.5px; margin: 0 0 4px; }
#qmot { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; background: rgba(255,255,255,.9); padding: 7px 9px; border-radius: 8px; pointer-events: none; align-items: flex-end; }
#qmot .mb { width: 30px; text-align: center; font-size: 10.5px; color: var(--mut); } #qmot .bar { height: 54px; background: #e6ebf2; border-radius: 4px; position: relative; overflow: hidden; margin-bottom: 2px; } #qmot .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#52a3f0, #2f6db5); } #qmot .mb.cw .bar i { background: linear-gradient(#f0b152, #e08a1e); }
#qkeys { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 22px; align-items: flex-end; background: rgba(255,255,255,.86); padding: 9px 14px; border-radius: 12px; box-shadow: 0 4px 16px rgba(30,60,110,.14); user-select: none; }
#qkeys .grp { display: grid; gap: 4px; justify-items: center; } #qkeys .gt { font-size: 10.5px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; text-align: center; }
#qkeys .r { display: flex; gap: 4px; }
.kc { min-width: 42px; height: 42px; padding: 2px 6px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; border-radius: 8px; border: 1px solid #b9c3d1; border-bottom-width: 3px; background: #fff; font-weight: 700; touch-action: none; }
.kc small { font-size: 9px; font-weight: 600; color: var(--mut); } .kc.wide { min-width: 78px; }
.kc.on { background: var(--blue); border-color: #1f4f8a; color: #fff; transform: translateY(2px); border-bottom-width: 1px; } .kc.on small { color: #dbe9fb; }
@media (max-width: 900px) { #qkeys { gap: 10px; padding: 7px 8px; } .kc { min-width: 36px; height: 38px; } #qmot { display: none; } }

/* quadrotor view controls (frames, sensor screen) */
#qview { position: absolute; top: 10px; right: 10px; z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#qview .vrow { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.9); border: 1px solid #dfe4ea; border-radius: 10px; padding: 5px 9px; font-size: 12.5px; color: #2b3441; box-shadow: 0 2px 8px rgba(20,30,50,.10); }
#qview .vc { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
#qview .vl { color: #6b7686; font-weight: 600; }
#qview button { font: inherit; font-size: 12.5px; padding: 3px 9px; border: 1px solid #cfd6df; background: #fff; border-radius: 7px; cursor: pointer; color: #2b3441; }
#qview button:hover { background: #f1f5fa; }
#qview button.on { background: #2f6db5; border-color: #2f6db5; color: #fff; }
#qview button:disabled { opacity: .4; cursor: default; }
#qview .vseg { display: inline-flex; gap: 0; }
#qview .vseg button:first-child { border-radius: 7px 0 0 7px; } #qview .vseg button:last-child { border-radius: 0 7px 7px 0; margin-left: -1px; }

/* ---- quadrotor: tabs, landing, builder ---- */
#qtabs { display: flex; align-items: flex-end; gap: 2px; padding: 8px 12px 0; background: #e6eaf0; border-bottom: 1px solid var(--line); flex: none; }
.qtab { appearance: none; border: 1px solid var(--line); border-bottom: 0; background: #d6dce5; color: #46546a; font: 600 13px system-ui, sans-serif; padding: 8px 18px; border-radius: 9px 9px 0 0; cursor: pointer; margin-bottom: -1px; }
.qtab:hover { background: #eef1f6; }
.qtab.on { background: #fff; color: var(--blue); position: relative; z-index: 1; }
.qtabfill { flex: 1; }
#qland { flex: 1; background: #fff; display: flex; align-items: center; justify-content: center; color: #9aa5b4; font-size: 14px; }
#qdesigner[data-mode=landing] #qmain { display: none; }
#qdesigner:not([data-mode=landing]) #qland { display: none; }
#qbstage { display: none; position: relative; min-width: 0; background: #fff; flex-direction: column; overflow: hidden; }
#qdesigner[data-mode=build] #qbstage { display: flex; }
#qdesigner[data-mode=build] #qstage { display: none; }
#bTrayWrap { display: flex; align-items: stretch; background: #f3f5f9; border-bottom: 1px solid var(--line); flex: none; }
#bTray { display: flex; gap: 8px; overflow-x: auto; padding: 8px 6px; flex: 1; min-width: 0; scrollbar-width: thin; }
.barr { appearance: none; border: 0; background: #e6eaf0; width: 30px; font-size: 24px; line-height: 1; color: #33415a; cursor: pointer; flex: none; }
.barr:hover:not(:disabled) { background: #d6dde8; }
.barr:disabled { opacity: .3; cursor: default; }
.bitem { flex: 0 0 auto; width: 96px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 5px 4px 4px; text-align: center; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; position: relative; }
.bitem:hover { border-color: var(--blue); box-shadow: 0 1px 6px rgba(47,109,181,.25); }
.bitem canvas { display: block; margin: 0 auto; pointer-events: none; }
.bitem b { display: block; font-size: 11.5px; margin-top: 2px; color: #1f2a3c; }
.bitem small { display: block; font-size: 10px; color: #8a94a1; }
.bitem.done { opacity: .4; cursor: default; pointer-events: none; }
.bitem .bdg { position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 999px; padding: 0 5px; }
#bInstr { padding: 9px 14px; font-size: 13.5px; line-height: 1.4; background: #eef4fc; color: #1d3557; border-bottom: 1px solid #d5e2f3; flex: none; min-height: 40px; }
#bInstr.ready { background: #e3f6e9; color: #135b2e; border-bottom-color: #bfe6cb; font-weight: 600; }
#bInstr.warn { background: #fff4e0; color: #7a4a00; border-bottom-color: #f2dcae; }
#bArea { position: relative; flex: 1; min-height: 0; background: #fff; }
#bcv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#bToast { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(25,35,52,.9); color: #fff; padding: 7px 14px; border-radius: 8px; font-size: 13px; pointer-events: none; }
#bGhost { position: fixed; z-index: 99; pointer-events: none; opacity: .9; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.blist { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.blist li { padding: 2px 0 2px 22px; position: relative; color: #46546a; }
.blist li::before { content: '○'; position: absolute; left: 3px; color: #9aa5b4; }
.blist li.ok { color: #15803d; }
.blist li.ok::before { content: '✓'; color: #15803d; font-weight: 800; }
.blist li.opt { color: #7a8596; }
.btnrow { display: flex; gap: 6px; }
.btnrow + .btnrow { margin-top: 6px; }
.btnrow button { flex: 1; appearance: none; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 8px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; color: #2b3a52; }
.btnrow button:hover { background: #f1f5fa; }
.btnrow .wirebtn { background: #fff7e6; border-color: #f2c46d; color: #8a5300; }
.btnrow .wirebtn.on { background: #f59e0b; color: #fff; border-color: #d98206; }
#bNext:disabled { opacity: .45; cursor: not-allowed; }

/* landing cards + assembled view */
#qdesigner[data-mode=landing] #qtabs { display: none; }
#qland { flex-direction: column; gap: 6px; padding: 24px; color: inherit; }
#qland h1 { margin: 0; font-size: 26px; color: #1f2a3c; }
.qlsub { margin: 0 0 22px; color: #7a8596; font-size: 15px; }
.qcards { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.qcard { width: 340px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: #46546a; text-align: center; transition: transform .15s, box-shadow .15s, border-color .15s; }
.qcard:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: 0 10px 28px rgba(47,109,181,.22); }
.qcard b { font-size: 18px; color: #1f2a3c; margin-top: 4px; }
.qcard > span:last-child { font-size: 13.5px; line-height: 1.45; padding: 0 8px; }
.qimg { display: block; height: 220px; border-radius: 10px; background: #f6f8fb; overflow: hidden; }
.qimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
#qdesigner[data-mode=build][data-view=assembled] #qstage { display: block; }
#qdesigner[data-mode=build][data-view=assembled] #qbstage { display: none; }
#qBackWire { display: none; position: absolute; z-index: 5; left: 14px; bottom: 44px; appearance: none; border: 1px solid #d98206; background: #f59e0b; color: #fff; font: 700 13px system-ui, sans-serif; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
#qBackWire:hover { background: #e08c06; }
#qdesigner[data-view=assembled] #qBackWire { display: block; }

/* controller-design page: empty grid scene with just Take off / Land */
#qtl { display: none; position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translateX(-50%); gap: 10px; }
#qdesigner[data-mode=control] #qtl { display: flex; }
#qtl { left: auto; right: 14px; top: 12px; bottom: auto; transform: none; }
#qtl #qRS2 { background: #fff; color: var(--ink, #1c2a3d); border: 1px solid #c9d3e0; box-shadow: none; padding: 12px 16px; font-weight: 600; }
#qtl button { appearance: none; border: 0; border-radius: 10px; padding: 12px 26px; font: 700 15px system-ui, sans-serif; cursor: pointer; color: #fff; background: var(--blue); box-shadow: 0 3px 12px rgba(30,60,110,.28); }
#qtl button:hover { filter: brightness(1.08); }
#qtl #qLD2 { background: #e0661a; }
#qdesigner[data-mode=control] #qview { display: none; }
#qkeys.legend .kc { pointer-events: none; }

.qbat { display: inline-block; vertical-align: -2px; width: 46px; height: 11px; border: 1.5px solid #6b7686; border-radius: 3px; margin: 0 5px 0 2px; position: relative; overflow: hidden; background: #fff; }
.qbat i { display: block; height: 100%; background: #2e9e57; }
.qbat.low i { background: #e0a21b; } .qbat.crit i { background: #d33a2c; }
#qhud .crit { color: #c0332a; font-weight: 700; } #qhud .low { color: #a96b00; font-weight: 700; }
#qDrain { width: 100%; padding: 7px 8px; font: inherit; border: 1px solid #c9d3e0; border-radius: 8px; background: #fff; }

/* top bar of each left panel: back link on the left, a light green "Next" on the right (stays visible while the panel scrolls) */
.topbar { position: sticky; top: -14px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -14px -16px 8px; padding: 9px 16px; background: var(--bg); }
.topnext { appearance: none; cursor: pointer; font: 700 13px system-ui, sans-serif; color: #1b7a43; background: rgba(46,160,90,.14); border: 1px solid rgba(46,160,90,.38); border-radius: 8px; padding: 6px 16px; }
.topnext:hover:not(:disabled) { background: rgba(46,160,90,.24); }
.topnext:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 900px) { .topbar { position: static; margin: 0 0 8px; padding: 0; } }

/* watermark: faint tiled diagonal text over the scene, plus a small grey line at the bottom */
.wmf { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; z-index: 0; pointer-events: none; user-select: none; font: 600 10.5px/12px system-ui, sans-serif; letter-spacing: .06em; color: rgba(70,85,105,.5); }
#qkeys { bottom: 18px; }

/* home hero: two pictures (robot arm and FPV drone) */
.hero-img.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
.hero-img.two figure { margin: 0; position: relative; }
.hero-img.two img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 62%; }
.hero-img.two figcaption { position: absolute; left: 10px; bottom: 9px; font: 700 12px system-ui, sans-serif; color: #2c4466; background: rgba(255,255,255,.88); padding: 3px 10px; border-radius: 999px; }
.hero .cta { flex-wrap: wrap; }
@media (max-width: 900px) { .hero-img.two { grid-template-columns: 1fr 1fr; } }
.hero:has(.hero-img.two) { grid-template-columns: 0.95fr 1.2fr; }
.hero:has(.hero-img.two) h1 { font-size: 46px; }
.hero-img.two img { aspect-ratio: 4 / 5; object-position: 50% 58%; }
@media (max-width: 900px) { .hero:has(.hero-img.two) { grid-template-columns: 1fr; } }

/* Wire button on the builder scene (mirrors the one in the Wiring section) */
#bWire2 { position: absolute; z-index: 3; right: 14px; top: 12px; appearance: none; cursor: pointer; font: 700 14px system-ui, sans-serif; padding: 9px 20px; border-radius: 10px; background: #fff7e6; color: #8a5300; border: 1px solid #f2c46d; box-shadow: 0 2px 8px rgba(120,80,0,.15); }
#bWire2:hover { filter: brightness(.97); }
#bWire2.on { background: #f59e0b; color: #fff; border-color: #d98206; }
#bWire2.on { right: auto; left: 14px; }

/* Take off / Land / Reset next to the steering keys (Simulate page) */
#qkeys .fl .r { width: 100%; }
#qkeys .fb { flex: 1; appearance: none; border: 0; border-radius: 9px; padding: 9px 12px; font: 700 13px system-ui, sans-serif; cursor: pointer; color: #fff; background: var(--blue); white-space: nowrap; }
#qkeys .fb:hover { filter: brightness(1.08); }
#qkeys .fb.ld { background: #e0661a; }
#qkeys .fb.rs { background: #fff; color: #1c2a3d; border: 1px solid #c9d3e0; }
#qkeys .grp { flex: none; } #qkeys .kc small { white-space: nowrap; }

/* ---- advanced settings drop-downs ---- */
details.adv { border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; }
details.adv > summary { cursor: pointer; font-weight: 700; font-size: 13px; padding: 9px 0; color: var(--ink); }
details.adv[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.adv > .note:first-of-type { margin-top: 0; }
details.adv .btnrow { margin-bottom: 8px; }
details.adv select { width: 100%; }
.atw { overflow-x: auto; margin: 2px 0 6px; }
table.atable { border-collapse: collapse; width: 100%; font-size: 11px; } table.atable th, table.atable td { border-bottom: 1px solid var(--line); padding: 4px 4px; text-align: right; white-space: nowrap; }
table.atable th { color: var(--mut); font-weight: 600; } table.atable th:first-child, table.atable td:first-child { text-align: left; }
#qmot .mb small { display: block; font-size: 9px; color: #3d4a5c; line-height: 1.1; margin-top: 1px; }
#qmot .mb { width: 38px; }
.edited{background:#fff8e1}
