/* GNSS interference article: static figures, worked example and the
 * GPS-track-vs-real-track map. Shares tokens with home.css / article.css. */
:root { --gn-land: #eef0e2; --gn-sea: #cfe0ee; --gn-lake: #b9d4ea; --gn-hill: #d9c9a6; --gn-gps: #d9822b; --gn-red: #c0392b; --gn-green: #1f7a4d; --gn-road: #8a8f98; --gn-zone: #b0287a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gn-land: #1a2a24; --gn-sea: #12304a; --gn-lake: #1d4566; --gn-hill: #4a3f2a; --gn-gps: #f0a050; --gn-red: #ef7b6c; --gn-green: #5fc493; --gn-road: #7d8794; --gn-zone: #e45aa9; } }
:root[data-theme="dark"] { --gn-land: #1a2a24; --gn-sea: #12304a; --gn-lake: #1d4566; --gn-hill: #4a3f2a; --gn-gps: #f0a050; --gn-red: #ef7b6c; --gn-green: #5fc493; --gn-road: #7d8794; --gn-zone: #e45aa9; }

/* Static figures */
.prose .fig.gn-fig svg.gf { width: 100%; max-width: 760px; height: auto; margin: 0 auto; display: block; }
.gf text { font-family: var(--mono); }
.gf-h { font: 700 13px var(--mono); fill: var(--ink); letter-spacing: 0.04em; }
.gf-s { font: 500 12px var(--mono); fill: var(--ink-soft); }
.gf-k { font: 600 12px var(--mono); fill: var(--magenta); }
.gf-w { font: 700 12px var(--mono); fill: #fff; }
.gf-tab { fill: #1b2733; stroke: #3a4756; stroke-width: 2; }
.gf-scr { fill: var(--gn-land); }
.gf-sea { fill: var(--gn-sea); }
.gf-hill { fill: var(--gn-hill); stroke: color-mix(in srgb, var(--gn-hill) 60%, var(--ink)); stroke-width: 1; }
.gf-plan { fill: none; stroke: var(--magenta); stroke-width: 3; stroke-linecap: round; }
.gf-trk { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; }
.gf-gtrk { fill: none; stroke: var(--gn-gps); stroke-width: 2.6; stroke-dasharray: 6 4; stroke-linecap: round; }
.gf-ac { fill: var(--blue); }
.gf-gac { fill: var(--gn-gps); stroke: #1b2733; stroke-width: 1; }
.gf-gac.lost { fill: #8a8f98; }
.gf-ghost { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 3 3; }
.gf-flag { fill: var(--gn-red); }
.gf-bar { fill: #0b1118; }
.gf-bt { font: 600 11px var(--mono); fill: #e9edf2; }
.gf-bt.bad { fill: #ff8a7a; }
.gf-box { fill: var(--card); stroke: var(--rule); stroke-width: 1.4; }
.gf-boxk { fill: color-mix(in srgb, var(--magenta) 10%, var(--card)); stroke: var(--magenta); stroke-width: 1.6; }
.gf-boxg { fill: color-mix(in srgb, var(--gn-green) 12%, var(--card)); stroke: var(--gn-green); stroke-width: 1.6; }
.gf-arr { fill: none; stroke: var(--ink-soft); stroke-width: 1.8; }
.gf-ah { fill: var(--ink-soft); }
.gf-ld { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }

/* Worked example: one step per line, the "=" signs in one column */
.gn-calc { margin: 1.2em 0 0; padding: 14px 18px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--blue); border-radius: 10px; font: 500 15px/1.7 var(--mono); color: var(--ink); }
.gn-calc .row { display: grid; grid-template-columns: 4.4em 1.2em minmax(0, 1fr); align-items: baseline; }
.gn-calc .row > span:nth-child(1) { white-space: nowrap; text-align: right; padding-right: 0.3em; }
.gn-calc .row > span:nth-child(2) { text-align: center; }
.gn-calc .row b { font-weight: 600; }
.gn-calc .key { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--rule); font: 400 15px/1.5 var(--body); color: var(--ink-soft); }
.gn-calc .key p { margin: 0; font-size: 15px; }
.gn-calc .key p + p { margin-top: 3px; }

/* Widget */
.widget.gn { grid-template-columns: 1fr; gap: 14px; align-items: start; }
.gn-map { margin: 0; min-width: 0; }
.gn-svg { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
.gn-svg text { font-family: var(--mono); }
.gn-land { fill: var(--gn-land); }
.gn-sea { fill: var(--gn-sea); }
.gn-lake { fill: var(--gn-lake); stroke: color-mix(in srgb, var(--gn-lake) 55%, var(--ink)); stroke-width: 1; }
.gn-hill { fill: var(--gn-hill); stroke: color-mix(in srgb, var(--gn-hill) 60%, var(--ink)); stroke-width: 1; }
.gn-town { fill: color-mix(in srgb, var(--ink-soft) 35%, var(--gn-land)); stroke: var(--ink-soft); stroke-width: 1; }
.gn-river { fill: none; stroke: color-mix(in srgb, var(--gn-lake) 70%, var(--blue)); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.gn-mway { stroke: var(--gn-road); stroke-width: 3.5; stroke-linecap: round; }
.gn-hatch { stroke: var(--gn-red); stroke-width: 1.4; opacity: 0.55; }
.gn-r { stroke: var(--gn-red); stroke-width: 2; }
.gn-zone { fill: color-mix(in srgb, var(--gn-zone) 4%, transparent); stroke: var(--gn-zone); stroke-width: 1.2; stroke-dasharray: 2 6; opacity: 0.35; }
.gn-zone.on { fill: color-mix(in srgb, var(--gn-zone) 7%, transparent); stroke-width: 2; stroke-dasharray: 8 5; opacity: 1; }
.gn-vor { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
.gn-vord { fill: var(--ink); }
.gn-plan { fill: none; stroke: var(--magenta); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; opacity: 0.85; }
.gn-ad { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.gn-wp { fill: var(--card); stroke: var(--magenta); stroke-width: 2.4; }
.gn-trk { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.gn-gtrk { fill: none; stroke: var(--gn-gps); stroke-width: 3; stroke-dasharray: 7 5; stroke-linejoin: round; stroke-linecap: round; }
.gn-ac path { fill: none; stroke: var(--blue); stroke-width: 3.2; stroke-linecap: round; }
.gn-gac path { fill: var(--gn-gps); stroke: #1b2733; stroke-width: 1.2; stroke-linejoin: round; }
.gn-gac.lost path { fill: #8a8f98; }
.gn-flag rect { fill: var(--gn-red); }
.gn-flag text { font: 700 13px var(--mono); fill: #fff; }
.gn-lb { font: 500 15px var(--mono); fill: var(--ink-soft); }
.gn-lb.gn-b { font-weight: 700; fill: var(--ink); }
.gn-lb.gn-it { font-style: italic; }
.gn-lb.gn-rt { fill: var(--gn-red); font-weight: 600; }
.gn-lb.gn-sch { font-size: 12px; letter-spacing: 0.06em; fill: var(--ink-soft); }
.gn-sea-t { letter-spacing: 0.12em; }
.gn-sc { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.gn-n { fill: var(--ink); }
.gn-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--ink-soft); }
.gn-legend li { display: flex; align-items: center; gap: 6px; }
.gn-legend i { display: inline-block; width: 26px; height: 0; border-top: 3px solid; }
.gn-legend .lg-plan { border-color: var(--magenta); }
.gn-legend .lg-real { border-color: var(--blue); }
.gn-legend .lg-gps { border-top-style: dashed; border-color: var(--gn-gps); }
.gn-legend .lg-area { height: 10px; border: 2px dashed var(--gn-zone); background: color-mix(in srgb, var(--gn-zone) 12%, transparent); border-radius: 3px; }
.gn-read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gn-box { background: var(--paper-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.gn-box h4 { margin: 0 0 6px; font: 600 12px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.gn-tab h4 { color: var(--gn-gps); }
.gn-chk h4 { color: var(--blue); }
.gn-box dl { margin: 0; display: grid; gap: 5px; }
.gn-box dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.gn-box dt { font-size: 14px; color: var(--ink-soft); min-width: 0; }
.gn-box dd { margin: 0; font: 600 14px/1.3 var(--mono); color: var(--ink); text-align: right; }
.gn-box dd.bad { color: var(--gn-red); }
.w-note.gn-say { font-size: 16px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; border-left: 4px solid var(--gn-green); background: color-mix(in srgb, var(--gn-green) 9%, transparent); color: var(--ink); min-height: 4.6em; }
.w-note.gn-say.warn { color: var(--ink); font-weight: 500; border-left-color: var(--magenta); background: color-mix(in srgb, var(--magenta) 8%, transparent); }
.gn-ctl { display: grid; grid-template-columns: auto 1fr; gap: 14px 20px; }
.gn-group { display: grid; gap: 6px; align-content: start; }
.gn-lbl { font-size: 15px; color: var(--ink-soft); }
.gn-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.gn-seg button, .gn-btn { font: 600 14px var(--body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; }
.gn-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gn-seg button:focus-visible, .gn-btn:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
.gn-btns { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.gn-btn.gn-go { background: var(--magenta); border-color: var(--magenta); color: #fff; min-width: 7em; text-align: center; }
.w-note.gn-note { font-size: 13px; }
[hidden] { display: none !important; }

@media (max-width: 720px) {
  .gn-read, .gn-ctl { grid-template-columns: 1fr; }
  .gn-box dt, .gn-box dd { font-size: 13px; }
  .gn-calc { font-size: 13.5px; padding: 12px; }
}
