/* Navigation display (nav-display.js). Deep Space HUD: cyan instrument, gold target, magenta planned course, green track. */
.nd { width: 100%; max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: .5rem; font-family: var(--font-mono); color: var(--text); }
.nd-scope {
  position: relative; aspect-ratio: 1 / 1; width: 100%; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, rgba(54, 227, 255, 0.07), transparent 62%), var(--void);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  border: 1px solid var(--line-strong);
}
.nd-scope::before { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(54, 227, 255, 0.035) 0 1px, transparent 1px 3px);
}
.nd-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.nd-svg text { font-family: var(--font-mono); text-anchor: middle; dominant-baseline: middle; }
.nd-svg text[text-anchor=start] { text-anchor: start; }
.nd-svg text[text-anchor=end] { text-anchor: end; }

.nd-rings circle { fill: none; stroke: rgba(54, 227, 255, 0.22); stroke-width: 1.5; stroke-dasharray: 6 8; }
.nd-rings line { stroke: rgba(54, 227, 255, 0.10); stroke-width: 1; }
.nd-rings text { fill: var(--cyan); opacity: .75; font-size: 20px; }
.nd-ring { fill: none; stroke: var(--cyan); stroke-width: 2.5; filter: drop-shadow(0 0 4px rgba(54, 227, 255, .6)); }
.nd-rose line { stroke: var(--cyan); stroke-width: 2; opacity: .75; }
.nd-rose line.major { stroke-width: 3; opacity: 1; }
.nd-rose text { fill: var(--text); font-size: 26px; font-weight: 600; }
.nd-rose text.card { fill: var(--cyan); font-family: var(--font-display); font-size: 30px; }
.nd-lubber { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.nd-hdg path { fill: rgba(5, 8, 20, 0.85); stroke: var(--cyan); stroke-width: 2; }
.nd-hdg text { fill: var(--cyan); font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.nd-hdg.unsure path { stroke: var(--amber); }
.nd-hdg.unsure text { fill: var(--amber); }
.nd-sweep { animation: nd-sweep 6s linear infinite; }
@keyframes nd-sweep { to { transform: rotate(360deg); } }

.nd-turnarc { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; opacity: .85; filter: drop-shadow(0 0 6px var(--gold)); }
.nd-turnarc.hard { stroke: var(--amber); filter: drop-shadow(0 0 6px var(--amber)); }
.nd-brg { fill: var(--gold); }
.nd-crs { fill: var(--magenta); }
.nd-route { stroke: var(--magenta); stroke-width: 3.5; filter: drop-shadow(0 0 5px rgba(224, 75, 255, .7)); }
.nd-route-start { fill: none; stroke: var(--magenta); stroke-width: 2.5; }
.nd-bearing { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 3 9; opacity: .6; }
.nd-track { fill: none; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; opacity: .9; filter: drop-shadow(0 0 4px rgba(59, 255, 176, .6)); }
.nd-fix { fill: var(--green); }
.nd-trend { stroke: var(--green); stroke-width: 2.5; stroke-dasharray: 10 8; opacity: .75; }
.nd-trend-dot { fill: var(--void); stroke: var(--green); stroke-width: 2; }
.nd-target path { fill: rgba(255, 197, 107, .15); stroke: var(--gold); stroke-width: 3; }
.nd-target circle { fill: var(--gold); }
.nd-target.out path { stroke-dasharray: 5 4; }
.nd-target.reached path { stroke: var(--green); fill: rgba(59, 255, 176, .2); }
.nd-target-label { fill: var(--gold); font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.nd-target-dist { fill: var(--text-muted); font-size: 19px; }
.nd-ship path { fill: rgba(5, 8, 20, .7); stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; }
.nd-ship.idle circle { fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-dasharray: 4 4; }
.nd-cdi circle { fill: none; stroke: var(--text-muted); stroke-width: 2; }
.nd-cdi .mid { stroke: var(--text); stroke-width: 2; }
.nd-cdi .bar { fill: var(--magenta); filter: drop-shadow(0 0 5px var(--magenta)); }
.nd-cdi.pegged .bar { fill: var(--amber); }
.nd-cdi text { fill: var(--text-muted); font-size: 19px; letter-spacing: 1px; }

/* corner readouts */
.nd-corner { position: absolute; z-index: 3; font-size: clamp(.62rem, 1.5vw, .85rem); letter-spacing: .08em; line-height: 1.35; text-transform: uppercase; }
.nd-tl { top: 2.2%; left: 3%; } .nd-tr { top: 2.2%; right: 3%; text-align: right; }
.nd-bl { bottom: 3%; left: 3%; } .nd-br { bottom: 3%; right: 3%; text-align: right; }
.nd-row { display: flex; gap: .55em; align-items: baseline; }
.nd-tr .nd-row { justify-content: flex-end; }
.nd-row span { color: var(--text-muted); }
.nd-row b { color: var(--green); font-weight: 600; font-size: 1.3em; }
.nd-row b small { font-size: .6em; color: var(--text-muted); font-weight: 400; }
.nd-row.gold b { color: var(--gold); }
.nd-row.rng b { color: var(--cyan); font-size: 1em; }
.nd-row.warn b { color: var(--amber); font-size: 1em; }
.nd-wpt { font-family: var(--font-display); color: var(--gold); font-size: 1.15em; letter-spacing: .12em; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.nd-pos { color: var(--cyan); }
.nd .dim { color: var(--text-dim); }
.nd-fixage { color: var(--green); display: inline-flex; align-items: center; gap: .45em; }
.nd-fixage i { width: .55em; height: .55em; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 2.4s ease-in-out infinite; }
.nd-fixage.stale { color: var(--amber); }

/* the instruction, TomTom style */
.nd-cmd {
  text-align: center; display: flex; flex-direction: column; gap: .15rem; padding: .45rem 1.1rem;
  background: rgba(5, 8, 20, .72); border: 1px solid currentColor; color: var(--cyan);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.nd-cmd b { font-family: var(--font-display); font-size: clamp(.95rem, 2.6vw, 1.6rem); letter-spacing: .12em; text-shadow: 0 0 14px currentColor; white-space: nowrap; }
.nd-cmd span { font-family: var(--font-ui); font-size: clamp(.7rem, 1.4vw, .9rem); color: var(--text-muted); letter-spacing: .04em; }
.nd-cmd.ok { color: var(--green); } .nd-cmd.turn { color: var(--gold); } .nd-cmd.hard { color: var(--amber); } .nd-cmd.wait { color: var(--text-muted); }
.nd-cmd.hard b { animation: pulse 1.2s ease-in-out infinite; }

.nd-tools { display: flex; justify-content: center; gap: .35rem; flex-wrap: wrap; }
.nd-tools .btn.on { box-shadow: inset 0 0 0 1px var(--cyan); color: var(--cyan); }

.nd-hints p { margin: 0; padding: .4rem .7rem; border-left: 2px solid var(--amber); background: rgba(255, 159, 67, 0.07); font-family: var(--font-body); font-size: .8rem; color: var(--text-muted); }
.nd-hints p + p { margin-top: .35rem; }
.nd-hints a { color: var(--cyan); }


/* ---------- space display (nav-space.js): out of the atmosphere ---------- */
.nd.nd-in-space { max-width: none; }
.nd.nd-in-space > .nd-cmd, .nd.nd-in-space > .nd-scope, .nd.nd-in-space > .nd-tools, .nd.nd-in-space > .nd-hints { display: none; }
.nd:not(.nd-in-space) > .nd-space { display: none; }
.nd-space { container-type: inline-size; }
.nsp { display: flex; flex-direction: column; gap: .6rem; }
.nsp-cmd { text-align: center; padding: .6rem .8rem; border: 1px solid var(--line-strong); background: var(--glass-strong); clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm)); }
.nsp-cmd b { display: block; font-family: var(--font-display); font-size: clamp(1rem, 4.2cqi, 1.45rem); letter-spacing: .07em; text-transform: uppercase; color: var(--cyan); }
.nsp-cmd.ok b { color: var(--green); } .nsp-cmd.turn b { color: var(--gold); } .nsp-cmd.hard b { color: var(--amber); }
.nsp-cmd span { display: block; color: var(--text-muted); font-family: var(--font-body); font-size: .85rem; margin-top: .2rem; }
.nsp-cmd em { display: block; font-style: normal; color: var(--gold); font-size: .8rem; margin-top: .3rem; }
.nsp-cmd em:empty { display: none; }
.nsp-methods { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.nsp-methods .hud-label { margin-right: .3rem; }
.nsp-views { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@container (min-width: 820px) { .nsp-views { grid-template-columns: 1fr 1fr; } }
.nsp-3d { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); background: radial-gradient(ellipse at center, rgba(26, 35, 71, .55), rgba(2, 4, 10, .9)); cursor: grab; touch-action: none; }
.nsp-3d:active { cursor: grabbing; }
.nsp-3d canvas { width: 100%; height: 100%; display: block; }
.nsp-ro { position: absolute; font-size: .7rem; color: var(--text-muted); pointer-events: none; line-height: 1.45; }
.nsp-ro b { color: var(--text); font-weight: 600; } .nsp-ro .g { color: var(--green); } .nsp-ro .y { color: var(--gold); } .nsp-ro .a { color: var(--amber); }
.nsp-tl { top: .4rem; left: .5rem; } .nsp-tr { top: .4rem; right: .5rem; text-align: right; } .nsp-bl { bottom: .4rem; left: .5rem; } .nsp-br { bottom: .4rem; right: .5rem; text-align: right; }
.nsp-skyhead { display: flex; justify-content: space-between; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .3rem; }
.nsp-skyhead > span:last-child { display: flex; gap: .3rem; align-items: center; }
.nsp-sky { width: 100%; display: block; border: 1px solid var(--line); background: radial-gradient(ellipse at center, rgba(17, 24, 51, .7), rgba(2, 4, 10, .95)); }
.nsp-sky text { font-family: var(--font-mono); font-size: 11px; fill: var(--text-muted); }
.nsp-sky .mk { fill: none; stroke: var(--cyan); stroke-width: 1.4; }
.nsp-sky .mk.big { stroke: var(--text); }
.nsp-sky .key { fill: none; stroke: var(--violet); stroke-width: 2; }
.nsp-sky .lbl-big { fill: var(--text); }
.nsp-sky .tgt { fill: none; stroke: var(--gold); stroke-width: 2; }
.nsp-sky .tgt-t { fill: var(--gold); }
.nsp-sky .xhair { stroke: var(--green); stroke-width: 1.2; }
.nsp-sky .calib { fill: none; stroke: var(--green); stroke-dasharray: 3 4; opacity: .7; }
.nsp-sky .nudge { stroke: var(--gold); stroke-width: 2.2; fill: none; }
.nsp-sky .ah { fill: var(--gold); }
.nsp-sky .edge { fill: var(--cyan); opacity: .75; }
.nsp-sky .up { fill: var(--violet); }
.nsp-sky .frame { fill: none; stroke: var(--line-strong); }
.nsp-steps { margin: 0; padding-left: 1.3rem; font-family: var(--font-body); font-size: .88rem; color: var(--text); }
.nsp-steps li { margin: .3rem 0; }
.nsp-note { margin: 0; font-family: var(--font-body); }
