/* 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); }

@media (prefers-reduced-motion: reduce) { .nd-sweep, .nd-fixage i, .nd-cmd.hard b { animation: none; } }
