/* VOR trainer (js/vor.js): map, receivers, and the VOR indicator. Uses the app's color variables. */
.vr-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.vr-bar select { height: 36px; }
.vr-seg { display: inline-flex; gap: 4px; }
.vr-hdg { min-width: 52px; text-align: center; font: 800 1.15rem var(--display); }
.vr-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.vr-mapcard { padding: 10px; position: sticky; top: calc(var(--bar) + 12px); }
.vr-hint { margin: 8px 4px 0; }
.vr-rxs { display: flex; flex-direction: column; gap: 14px; }
.vr-rx[hidden] { display: none; }
.vr-rx-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.vr-rx-top > b { font: 800 1.1rem var(--display); }
.vr-tune { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: #0b0e14; }
.vr-tune .btn { color: #cbd5e1; height: 32px; min-width: 30px; padding: 0 6px; }
.vr-freq { min-width: 76px; text-align: center; font: 800 1.2rem "Consolas", "Courier New", monospace; color: #34d399; letter-spacing: .04em; text-shadow: 0 0 8px rgba(52, 211, 153, .5); }
.vr-rx-body { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); gap: 12px; align-items: start; }
.vr-cdi { cursor: ns-resize; touch-action: none; }
.vr-rx-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vr-obsbtn { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vr-obsbtn .btn { padding: 0 9px; height: 32px; }
.vr-read { display: grid; gap: 2px; font-size: .9rem; }
.vr-read span { color: var(--ink-3); font-size: .78rem; margin-right: 6px; }
.vr-read b { font: 800 1.05rem var(--display); }
.vr-to { color: var(--good); } .vr-from { color: var(--orange-text); } .vr-off { color: var(--bad); }
.vr-morse { font-family: "Consolas", monospace; letter-spacing: .08em; min-height: 1.2em; }
.vr-morse.on { color: var(--good); text-shadow: 0 0 8px rgba(35, 130, 79, .4); }
.vr-explain { margin-top: 10px; padding: 9px 11px; border-radius: var(--r-s); background: var(--canvas); color: var(--ink-2); line-height: 1.45; }
.vr-qcdis { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.vr-qcdis .vi { max-width: 240px; }
.vr-hdgline { text-align: center; margin: 6px 0 0; }

/* map */
.vr-map { display: block; width: 100%; height: auto; border-radius: var(--r-s); touch-action: none; cursor: crosshair; }
.vr-bg { fill: #0f1520; }
.vr-grid { fill: none; stroke: rgba(148, 163, 184, .12); stroke-width: 1; }
.vr-north, .vr-scale { fill: #94a3b8; font: 700 11px var(--ui); }
.vr-north { text-anchor: end; }
.vr-rose { fill: none; stroke: #3b82f6; stroke-width: 1; opacity: .7; }
.vr-tick { stroke: #60a5fa; stroke-width: 1; opacity: .8; }
.vr-rlab { fill: #93c5fd; font: 700 9px var(--display); text-anchor: middle; }
.vr-cone { fill: rgba(var(--amber-rgb), .08); stroke: var(--amber); stroke-width: 1; stroke-dasharray: 2 3; }
.vr-vor { fill: #0f1520; stroke: #7dd3fc; stroke-width: 1.6; }
.vr-dot { fill: #7dd3fc; }
.vr-callout rect { fill: rgba(15, 21, 32, .9); stroke: #7dd3fc; stroke-width: 1; }
.vr-cname { fill: #e2e8f0; font: 700 10px var(--ui); text-anchor: middle; }
.vr-cfreq { fill: #7dd3fc; font: 600 9.5px var(--ui); text-anchor: middle; }
.vr-course line { stroke-width: 2; }
.vr-course.n1 .vr-from, .vr-course.n1 .vr-toline { stroke: #d946ef; }
.vr-course.n2 .vr-from, .vr-course.n2 .vr-toline { stroke: #22d3ee; }
.vr-toline { stroke-dasharray: 7 6; opacity: .8; }
.vr-perp { stroke: #94a3b8; stroke-width: 1 !important; stroke-dasharray: 2 5; opacity: .55; }
.vr-clab { font: 700 10.5px var(--display); }
.vr-course.n1 .vr-clab { fill: #f0abfc; } .vr-course.n2 .vr-clab { fill: #67e8f9; }
.vr-trail { fill: none; stroke: #fde68a; stroke-width: 2; stroke-dasharray: 1 4; stroke-linecap: round; }
.vr-plane path { fill: #ffb46b; stroke: #0f1520; stroke-width: 1; }
.vr-plane.me path { fill: var(--amber); filter: drop-shadow(0 0 4px var(--orange)); }
.vr-num circle { fill: #f8fafc; stroke: #0f1520; }
.vr-num text { fill: #0f1520; font: 800 11px var(--display); text-anchor: middle; }
.vr-plane.right path, .vr-num.right circle { fill: #4ade80; }

/* the VOR indicator */
.vi { display: block; width: 100%; height: auto; }
.vi-bezel { fill: #2b313d; } .vi-face { fill: #0b0e14; }
.vi-tick { stroke: #e2e8f0; stroke-width: 1.2; }
.vi-num { fill: #f8fafc; font: 700 11px var(--display); text-anchor: middle; dominant-baseline: central; }
.vi-index { fill: var(--amber); } .vi-index2 { fill: #64748b; }
.vi-obs { fill: var(--amber); font: 800 12px var(--display); text-anchor: middle; }
.vi-dot { fill: none; stroke: #e2e8f0; stroke-width: 1.3; }
.vi-ring { fill: none; stroke: #e2e8f0; stroke-width: 1.3; }
.vi-needle { stroke: #f8fafc; stroke-width: 3.2; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .6)); }
.vi-pivot { fill: #475569; }
.vi-tri { fill: #f8fafc; }
.vi-off { fill: var(--bad); }
.vi-offs { stroke: #fff; stroke-width: 2.4; }
.vi-flagt { fill: #e2e8f0; font: 700 8.5px var(--display); text-anchor: middle; }
.vi-knobc { fill: #1f2530; stroke: #64748b; stroke-width: 1.4; }
.vi-knurl { stroke: #475569; stroke-width: 1; }
.vi-knobt { fill: #e2e8f0; font: 800 7.5px var(--display); text-anchor: middle; }
.vi-label { fill: #94a3b8; font: 700 9px var(--display); text-anchor: middle; }

/* the glow on what a quiz asks you to read */
.vi .vg, .vr-map .vg { animation: vrGlow 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px var(--amber)) drop-shadow(0 0 12px var(--orange)); }
@keyframes vrGlow { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vi .vg, .vr-map .vg { animation: none; } }
@media (max-width: 980px) {
  .vr-layout { grid-template-columns: 1fr; }
  .vr-mapcard { position: static; }
}
@media (max-width: 520px) { .vr-rx-body { grid-template-columns: 1fr; } .vr-cdi { max-width: 240px; margin: 0 auto; } }
