body { background: #101317; }
.navbar-brand { font-weight: 700; letter-spacing: .02em; }

/* simulator layout */
body.sim { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.sim-body { flex: 1; display: flex; min-height: 0; }
.stage { position: relative; flex: 1; min-width: 0; }
#view { position: absolute; inset: 0; }
#view canvas { display: block; }
.panel { width: 360px; flex: none; overflow-y: auto; padding: 14px 16px; border-left: 1px solid var(--bs-border-color); background: #151a20; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8fa3b8; font-weight: 600; margin-bottom: 6px; }
.tiny { font-size: .72rem; }

.hover-tip { position: absolute; pointer-events: none; background: rgba(12,16,22,.92); border: 1px solid #3b4a5a; color: #e8eef5; padding: 4px 8px; border-radius: 4px; font-size: .78rem; max-width: 320px; z-index: 5; }
.demo-note { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(255,193,7,.12); border: 1px solid rgba(255,193,7,.4); color: #ffd666; padding: 4px 12px; border-radius: 20px; font-size: .8rem; }
.view-buttons { position: absolute; top: 10px; right: 12px; }

.flight-wrap { position: absolute; left: 14px; bottom: 14px; width: 400px; height: 248px; border: 1px solid #3b4a5a; border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.flight-title { position: absolute; top: 0; left: 0; right: 0; z-index: 2; font-size: .72rem; padding: 3px 8px; background: rgba(10,14,20,.7); color: #cfe3f7; }
#flightView { position: absolute; inset: 0; }
#flightView canvas { display: block; }
.reticle { position: absolute; left: 50%; top: 52%; width: 70px; height: 2px; margin-left: -35px; background: linear-gradient(90deg, #7CFC9A 0 40%, transparent 40% 60%, #7CFC9A 60%); z-index: 2; }
.flight-wrap.big { width: min(1100px, calc(100% - 28px)); height: min(640px, calc(100% - 70px)); z-index: 5; }
.alt-tape { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 2; min-width: 84px; padding: 4px 6px; border: 1px solid rgba(124,252,154,.55); border-radius: 4px; background: rgba(0,0,0,.4); color: #7CFC9A; font: 600 .66rem ui-monospace, Consolas, monospace; text-align: right; pointer-events: none; }
.alt-tape .alt-label, .alt-tape .alt-unit { font-size: .58rem; opacity: .75; }
.alt-tape .alt-big { font-size: 1.05rem; font-weight: 800; line-height: 1.15; }
.alt-tape .alt-row { display: flex; justify-content: space-between; gap: 6px; }
.alt-tape.low .alt-row:first-of-type b { color: #ffb84d; }
.flight-wrap.big .alt-tape { font-size: .85rem; min-width: 120px; right: 12px; }
.flight-wrap.big .alt-tape .alt-big { font-size: 1.6rem; }
.place-name { position: absolute; top: 22px; left: 0; right: 0; text-align: center; z-index: 2; color: #e8f3ff; font: 600 .7rem system-ui, sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,.9); pointer-events: none; }
.flight-wrap.big .place-name { font-size: .95rem; top: 30px; }
.flight-expand { position: absolute; top: 1px; right: 4px; z-index: 3; border: 0; background: transparent; color: #cfe3f7; font-size: .9rem; line-height: 1; padding: 2px 4px; cursor: pointer; }
.flight-expand:hover { color: #fff; }
.hud { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; font: 600 .72rem ui-monospace, Consolas, monospace; color: #7CFC9A; padding: 4px 8px; background: rgba(0,0,0,.35); z-index: 2; }

.pad { position: relative; width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(circle, #222a33 0 55%, #1a2028 56%); border: 1px solid #3b4a5a; touch-action: none; cursor: grab; }
.pad::before, .pad::after { content: ''; position: absolute; background: #2e3946; }
.pad::before { left: 50%; top: 8px; bottom: 8px; width: 1px; }
.pad::after { top: 50%; left: 8px; right: 8px; height: 1px; }
.knob { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffcf5a, #c98a00); box-shadow: 0 2px 6px rgba(0,0,0,.6); z-index: 1; }
.pad-f { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-size: .6rem; color: #6c7d90; }

.readout th { font-weight: 500; color: #9fb0c2; font-size: .8rem; }
.readout td { text-align: right; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: #e8eef5; }
.steps .list-group-item { padding: .35rem .6rem; font-size: .85rem; background: transparent; }
.steps .list-group-item.active { background: rgba(13,202,240,.15); border-color: rgba(13,202,240,.35); color: #8be8ff; }

@media (max-width: 900px) {
    body.sim { height: auto; overflow: auto; }
    .sim-body { flex-direction: column; }
    .stage { height: 70vh; }
    .panel { width: auto; border-left: 0; }
    .flight-wrap { width: 240px; height: 150px; }
}

/* parts page */
.parts h2 { font-size: 1.15rem; margin-top: 2rem; }
.parts table { font-size: .86rem; }
.parts td.num, .parts th.num { text-align: right; font-variant-numeric: tabular-nums; }
.parts .group-row td { background: #1b222b; font-weight: 600; color: #8fd3ff; }
.parts .tier-off { opacity: .35; }
.parts code { color: #ffcf5a; }
.parts .total { font-size: 1.4rem; font-weight: 700; }
pre.fw { background: #0b0e12; border: 1px solid #2b3540; padding: 12px; font-size: .78rem; max-height: 480px; overflow: auto; }

/* build step picture capture */
body.shot .navbar, body.shot .panel, body.shot .flight-wrap, body.shot .view-buttons, body.shot .demo-note, body.shot .hover-tip { display: none !important; }
.step-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.step-figs figure { margin: 0; }
.step-figs img { width: 100%; border-radius: 6px; border: 1px solid #2b3540; background: #14181e; }
.step-figs figcaption { font-size: .74rem; color: #8fa3b8; margin-top: 3px; }
.build-steps li { margin-bottom: .45rem; }
.check-box { background: #13202b; border: 1px solid #23465e; border-radius: 6px; padding: 8px 12px; font-size: .86rem; }
.is-ordered td, .is-ordered span, .is-ordered a { opacity: .55; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.flow span { background: #1b2733; border: 1px solid #2f4a60; border-radius: 4px; padding: 3px 8px; font-size: .78rem; }
.flow span:not(:last-child)::after { content: ' \2192'; color: #8fd3ff; margin-left: 6px; }
.toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; }
.toc a { color: #9fb0c2; text-decoration: none; }
.toc a:hover { color: #8fd3ff; }

.flight-alert { position: absolute; top: 16%; left: 0; right: 0; text-align: center; z-index: 3; font: 800 1.05rem ui-monospace, Consolas, monospace; letter-spacing: .12em; pointer-events: none; white-space: pre; }
.flight-alert.warn { color: #ff4d4d; text-shadow: 0 0 6px rgba(0,0,0,.8); animation: fsd-blink .5s steps(2, start) infinite; }
.flight-alert.crashed { color: #ffd666; font-size: 1.5rem; text-shadow: 0 2px 8px rgba(0,0,0,.9); }
@keyframes fsd-blink { to { visibility: hidden; } }
.crash-flash { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(circle, #fff6d0, #ff9a3c 45%, rgba(255,80,0,0) 75%); opacity: 0; }
.crash-flash.go { animation: fsd-flash .9s ease-out; }
@keyframes fsd-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
