/* GREAT EAGLE DESIGNS - Product walkthrough HUD (recovered from the legacy homepage inline <style>) */
    /* ═══════════════ JARVIS / IRON-MAN HUD WALKTHROUGH ═══════════════
       Thin 1px glowing strokes only (accent via --hud), translucent dark
       panels, monospace. Layering preserved: scrim 440, header 450, tour 505. */
    /* Semantic HUD tokens — dark defaults. --hud is the accent RGB triplet
       (used everywhere for strokes/glows); the --hud-* tokens below carry the
       theme-specific scrim, line glow, ambient strength and alert colour.
       Light mode overrides them (see [data-theme="light"] block) so the SAME
       markup reskins live when the theme toggles — no JS restart needed. */
    .gtour--hud {
      --hud: 25,211,255; --hud-soft: rgba(25,211,255,0.14);
      --hud-scrim: rgba(0,0,0,0.65);
      --hud-line: #19d3ff;
      --hud-glow: drop-shadow(0 0 6px rgba(25,211,255,0.7));
      --hud-ambient: rgba(25,211,255,0.25);
      --hud-ambient-opacity: 0.5;
      --hud-alert: #ff4b3a;
      --hud-boot-bg: rgba(2,8,14,0.72);
      --hud-focus-outline: 0 0 0 0 transparent;
      font-family: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
    }
    .gtour--hud[data-accent="red"]   { --hud: 255,60,58; }
    .gtour--hud[data-accent="green"] { --hud: 54,230,140; }
    /* Light theme: TERMINAL GREEN. On-page line (#0a8a3c) is a crisp 1.5px
       stroke with NO neon glow (soft shadow instead); the panel itself stays
       a dark-green glass with bright-green (#39ff7a) headers so it reads on a
       light page. Panel body text is a near-white green (#e8fff0). The accent
       triplet drives panel text + ambient glow (bright green 57,255,122). */
    [data-theme="light"] .gtour--hud {
      --hud: 57,255,122;
      --hud-scrim: rgba(8,24,14,0.40);
      --hud-line: #0a8a3c;
      --hud-glow: drop-shadow(0 1px 2px rgba(10,138,60,0.35));
      --hud-ambient: rgba(10,138,60,0.30);
      --hud-ambient-opacity: 0.6;
      --hud-alert: #f5a623;                 /* final-step alert = amber */
      --hud-boot-bg: rgba(8,24,14,0.55);
      --hud-focus-outline: 0 0 0 1px var(--hud-line);
      --hud-panel-bg: rgba(6,20,12,0.92);   /* dark-green glass */
    }
    .gtour--hud { --hud-panel-bg: rgba(8,18,32,0.88); --hud-alert: #ff4b3a; }
    .gtour--hud[data-accent="red"]   { --hud-line: #ff4b3a; }
    .gtour--hud[data-accent="green"] { --hud-line: #36e68c; }
    [data-theme="light"] .gtour--hud[data-accent="red"]   { --hud-line: #d62828; }
    [data-theme="light"] .gtour--hud[data-accent="green"] { --hud-line: #0a8f4f; }
    .gtour { position: fixed; inset: 0; z-index: 505; display: none; pointer-events: none; }
    .gtour.on { display: block; }
    /* Dim scrim — own layer BELOW the header (z 440). Theme-aware. The scrim
       is a body-level sibling of .gtour, so its colour is keyed on the theme
       attribute directly (dark default / terminal-green-tinted in light). */
    .gtour-scrim { position: fixed; inset: 0; z-index: 440; background: rgba(0,0,0,0.65);
      pointer-events: none; opacity: 0; display: none; }
    [data-theme="light"] .gtour-scrim { background: rgba(8,24,14,0.40); }
    .gtour-scrim.on { display: block; opacity: 1; pointer-events: auto; }

    /* ── Ambient HUD layer (faint, below card, non-interactive) ── */
    .hud-ambient { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: var(--hud-ambient-opacity); }
    .hud-ruler { position: absolute; top: 8%; bottom: 8%; width: 14px; }
    .hud-ruler--l { left: 6px; } .hud-ruler--r { right: 6px; }
    .hud-ruler::before { content: ''; position: absolute; inset: 0;
      background: repeating-linear-gradient(to bottom, rgba(var(--hud),0.5) 0 1px, transparent 1px 13px); }
    .hud-dial { position: absolute; left: 22px; bottom: 96px; width: 92px; height: 92px; overflow: visible; }
    .hud-dial-ring, .hud-dial-ring2 { stroke: rgba(var(--hud),0.3); stroke-width: 1; stroke-dasharray: 3 5; }
    .hud-dial-arc { stroke: rgba(var(--hud),0.85); stroke-width: 1.5; transform-origin: 50px 50px; animation: hudSpin 7s linear infinite; }
    .hud-dial-arc2 { stroke: rgba(var(--hud),0.5); stroke-width: 1; transform-origin: 50px 50px; animation: hudSpin 11s linear infinite reverse; }
    .hud-dial-core { fill: rgba(var(--hud),0.9); }
    @keyframes hudSpin { to { transform: rotate(360deg); } }
    .hud-readout { position: absolute; left: 24px; bottom: 60px; font-size: 10px; letter-spacing: 0.08em;
      color: rgba(var(--hud),0.75); line-height: 1.5; text-shadow: 0 0 6px rgba(var(--hud),0.5); }

    /* ── Countdown dial (above the rotating dial) ──
       Bigger ring + tick marks; the draining arc + number change colour by
       time ELAPSED (green → yellow → red) via --cd-color set in JS. Tuned to
       read clearly on the light-mode page too (darker track + a glass disc
       backing + a crisp number). */
    .hud-countdown { position: absolute; left: 20px; bottom: 210px; width: 116px; height: 116px; pointer-events: none;
      opacity: 1; transition: opacity 0.3s var(--hover-ease); --cd-color: var(--hud-line); }
    /* Soft dark glass disc behind the dial so both ring + number pop on any
       page colour (especially the light terminal-green theme). */
    .hud-countdown::before { content: ''; position: absolute; inset: 6px; border-radius: 50%;
      background: rgba(6,16,24,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
    [data-theme="light"] .hud-countdown::before { background: rgba(6,20,12,0.62); }
    .hud-countdown svg { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }
    .hud-cd-track { stroke: rgba(var(--hud),0.35); stroke-width: 2.5; }
    [data-theme="light"] .hud-cd-track { stroke: rgba(255,255,255,0.22); }
    .hud-cd-ticks line { stroke: rgba(var(--hud),0.8); stroke-width: 1.4; }
    [data-theme="light"] .hud-cd-ticks line { stroke: rgba(230,255,240,0.55); }
    /* Draining arc — colour driven by time left (green/yellow/red). */
    .hud-cd-arc { stroke: var(--cd-color); stroke-width: 3.5;
      filter: drop-shadow(0 0 6px var(--cd-color));
      stroke-linecap: round; stroke-dasharray: var(--cd-circ, 264); stroke-dashoffset: 0;
      transition: stroke 0.4s linear; }
    .hud-cd-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
    .hud-cd-label { font-family: ui-monospace, Consolas, monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.2em;
      text-transform: uppercase; color: #eafff3; opacity: 0.85; }
    .hud-cd-num { font-family: ui-monospace, Consolas, monospace; font-size: 24px; font-weight: 800; line-height: 1;
      color: var(--cd-color); text-shadow: 0 0 10px var(--cd-color); transition: color 0.4s linear; }
    /* Paused (card hovered): dim the ring, label switches to PAUSED. */
    .hud-countdown.paused { opacity: 0.6; }
    .hud-countdown.paused .hud-cd-arc { filter: none; }
    /* Hidden during endings / chrome-off. */
    .gtour.gtour-chrome-off .hud-countdown { display: none !important; }

    /* ── Target reticle: corner brackets + ticked ring + scan line ── */
    .hud-reticle { position: absolute; z-index: 6; pointer-events: none; }
    .hud-br { position: absolute; width: 18px; height: 18px; border: 1px solid var(--hud-line);
      box-shadow: 0 0 8px rgba(var(--hud),0.8); }
    [data-theme="light"] .hud-br { border-width: 1.5px; box-shadow: 0 1px 3px rgba(10,92,255,0.4); }
    .hud-br--tl { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
    .hud-br--tr { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
    .hud-br--bl { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }
    .hud-br--br { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
    /* Lock-in: brackets snap inward from larger size when a step opens. */
    .gtour:not(.gtour-staging) .hud-reticle.lock .hud-br { animation: hudLock 0.4s var(--hover-ease) both; }
    @keyframes hudLock { 0% { opacity: 0; } 100% { opacity: 1; } }
    .gtour:not(.gtour-staging) .hud-reticle.lock .hud-br--tl { animation-name: hudLockTL; }
    .gtour:not(.gtour-staging) .hud-reticle.lock .hud-br--tr { animation-name: hudLockTR; }
    .gtour:not(.gtour-staging) .hud-reticle.lock .hud-br--bl { animation-name: hudLockBL; }
    .gtour:not(.gtour-staging) .hud-reticle.lock .hud-br--br { animation-name: hudLockBR; }
    @keyframes hudLockTL { 0% { transform: translate(-22px,-22px); opacity: 0; } 100% { transform: none; opacity: 1; } }
    @keyframes hudLockTR { 0% { transform: translate(22px,-22px); opacity: 0; } 100% { transform: none; opacity: 1; } }
    @keyframes hudLockBL { 0% { transform: translate(-22px,22px); opacity: 0; } 100% { transform: none; opacity: 1; } }
    @keyframes hudLockBR { 0% { transform: translate(22px,22px); opacity: 0; } 100% { transform: none; opacity: 1; } }
    .hud-ring { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); overflow: visible;
      animation: hudRingPulse 1.6s ease-in-out infinite; }
    /* Large/non-round targets: brackets only, no ring. */
    .hud-reticle.hud-no-ring .hud-ring { display: none; }
    .hud-ring-circle { stroke: rgba(var(--hud),0.55); stroke-width: 1; filter: drop-shadow(0 0 4px rgba(var(--hud),0.6)); }
    .hud-ring-ticks line { stroke: rgba(var(--hud),0.8); stroke-width: 1.4; }
    @keyframes hudRingPulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.015); } }
    .hud-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; opacity: 0;
      background: linear-gradient(90deg, transparent, rgb(var(--hud)), transparent);
      box-shadow: 0 0 10px 2px rgba(var(--hud),0.8); }
    .hud-reticle.scanning .hud-scan { animation: hudScan 0.32s linear 1; }
    @keyframes hudScan { 0% { opacity: 1; top: 0; } 100% { opacity: 1; top: 100%; } }

    /* ── SVG leader line ── */
    .hud-leader { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 7; pointer-events: none; color: rgb(var(--hud)); }
    .hud-leader-path { stroke: var(--hud-line); stroke-width: 1.5; filter: var(--hud-glow);
      stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); }
    [data-theme="light"] .hud-leader-path { stroke-width: 1.5; }
    /* Small dot where the leader meets the card edge. */
    .hud-leader-dot { fill: var(--hud-line); filter: var(--hud-glow); opacity: 0; }
    .gtour:not(.gtour-staging) .hud-leader.draw .hud-leader-dot { opacity: 1; transition: opacity 0.2s ease 0.35s; }
    .gtour:not(.gtour-staging) .hud-leader.draw .hud-leader-path { animation: hudDraw 0.4s ease-out forwards; }
    @keyframes hudDraw { to { stroke-dashoffset: 0; } }

    /* ── Info panel: corner brackets, header, title, body, hint, readouts ──
       Dark glass in BOTH themes (per spec). Width clamps to the viewport and
       the height is auto so the body text always wraps and is never clipped. */
    .hud-panel { position: absolute; z-index: 8; width: min(360px, calc(100vw - 32px)); height: auto; pointer-events: auto;
      background: var(--hud-panel-bg, rgba(8,18,32,0.88)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
      padding: 15px 17px; color: #e6f6ff; overflow: visible;
      /* 1px accent border + soft outer glow so the card reads on both themes. */
      border: 1px solid rgba(var(--hud),0.45);
      box-shadow: 0 0 22px rgba(var(--hud),0.28), 0 18px 46px rgba(0,0,0,0.5); }
    [data-theme="light"] .hud-panel { color: #e8fff0; box-shadow: 0 0 22px rgba(10,138,60,0.28), 0 18px 46px rgba(0,0,0,0.4); }
    .hud-pbr { position: absolute; width: 14px; height: 14px; border: 1px solid var(--hud-line); box-shadow: 0 0 6px rgba(var(--hud),0.7); }
    [data-theme="light"] .hud-pbr { border-width: 1.5px; box-shadow: 0 1px 2px rgba(10,92,255,0.35); }
    .hud-pbr--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
    .hud-pbr--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
    .hud-pbr--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
    .hud-pbr--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
    /* Decorative HUD header line (small). */
    .hud-phead { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
      color: rgb(var(--hud)); margin-bottom: 8px; text-shadow: 0 0 6px rgba(var(--hud),0.6); }
    /* Final step: alert-coloured header (amber in light, warm red in dark). */
    .gtour.final-step .hud-phead { color: var(--hud-alert); text-shadow: 0 0 6px color-mix(in srgb, var(--hud-alert) 60%, transparent); }
    /* Plain-language title (bold, white / near-white green in light). */
    .hud-ptitle { font-size: 16px; font-weight: 800; color: #ffffff; line-height: 1.25; margin-bottom: 7px; letter-spacing: -0.01em; }
    [data-theme="light"] .hud-ptitle { color: #f1fff6; }
    /* Plain body — 14px, high contrast (>=4.5:1), wraps freely. */
    .hud-pbody { font-size: 14px; line-height: 1.5; color: #e6f6ff; letter-spacing: 0.005em;
      white-space: normal; overflow-wrap: anywhere; }
    [data-theme="light"] .hud-pbody { color: #e8fff0; }
    .hud-pbody .cur { display: inline-block; width: 7px; background: rgb(var(--hud)); margin-left: 1px; animation: hudCur 0.7s steps(1) infinite; vertical-align: -1px; }
    @keyframes hudCur { 50% { opacity: 0; } }
    /* Accent action hint. */
    .hud-phint { font-size: 13px; font-weight: 600; color: rgb(var(--hud)); margin-top: 9px; line-height: 1.4; }
    /* Compact filter-name chips inside the same card (no second card). */
    .hud-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
    .hud-chips:empty { display: none; }
    .hud-chips i { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
      color: rgb(var(--hud)); border: 1px solid rgba(var(--hud),0.45); border-radius: 100px; padding: 3px 9px; }
    /* Tiny secondary readouts. */
    .hud-readouts { display: flex; gap: 10px; margin-top: 12px; padding-top: 11px; flex-wrap: wrap; border-top: 1px solid rgba(var(--hud),0.3); }
    .hud-ro { flex: 1 1 auto; min-width: 60px; font-size: 10px; letter-spacing: 0.08em; color: rgba(230,246,255,0.6); text-transform: uppercase; }
    .hud-ro b { display: block; font-size: 11px; color: rgb(var(--hud)); font-weight: 700; margin-top: 2px; letter-spacing: 0.04em; }
    /* Segmented strength bar — fixed 4px tall, 10 segments, can never grow. */
    .hud-ro-bar { display: flex; gap: 2px; height: 4px; margin-top: 4px; overflow: hidden; }
    .hud-ro-seg { flex: 1 1 0; height: 4px; background: rgba(var(--hud),0.15); transition: background 0.4s var(--hover-ease); }
    .hud-ro-seg.on { background: rgb(var(--hud)); box-shadow: 0 0 4px rgba(var(--hud),0.6); }
    /* Glitch flicker when the panel appears. */
    .gtour:not(.gtour-staging) .hud-panel.glitch { animation: hudGlitch 0.26s steps(2) 1; }
    @keyframes hudGlitch { 0% { opacity: 0.2; transform: translateX(-2px); } 25% { opacity: 1; transform: translateX(2px); } 50% { opacity: 0.4; transform: translateX(-1px); } 100% { opacity: 1; transform: none; } }

    /* While staging (scrolling/measuring) hide reticle/leader/panel. */
    .hud-reticle, .hud-leader, .hud-panel, .hud-progress { opacity: 1; transition: opacity 0.18s var(--hover-ease); }
    .gtour.gtour-staging .hud-reticle,
    .gtour.gtour-staging .hud-leader,
    .gtour.gtour-staging .hud-panel { opacity: 0 !important; }
    /* Ending state: hide all the step chrome but keep #gtour displayed so the
       MISSION COMPLETE panel / WALKTHROUGH ENDED toast (children of #gtour)
       can still animate. */
    .gtour.gtour-chrome-off .hud-reticle,
    .gtour.gtour-chrome-off .hud-leader,
    .gtour.gtour-chrome-off .hud-panel,
    .gtour.gtour-chrome-off .hud-progress,
    .gtour.gtour-chrome-off .hud-ambient,
    .gtour.gtour-chrome-off .gtour-dock,
    .gtour.gtour-chrome-off .hud-esc { display: none !important; }

    /* ── Blinking red ESC badge (top-left), click to abort ── */
    .hud-esc { position: fixed; top: 18px; left: 18px; z-index: 12; cursor: pointer;
      display: inline-flex; align-items: center; gap: 10px; pointer-events: auto;
      font-family: ui-monospace, Consolas, monospace; background: rgba(8,8,10,0.6);
      border: 1px solid #ff3b30; border-radius: 6px; padding: 7px 12px;
      -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
      box-shadow: 0 0 14px rgba(255,59,48,0.45); animation: hudEscBlink 1.1s steps(1) infinite; }
    .hud-esc-key { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: #ff3b30;
      border: 1px solid #ff3b30; border-radius: 3px; padding: 1px 6px; }
    .hud-esc-txt { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #ff6a60; }
    .hud-esc:hover { box-shadow: 0 0 20px rgba(255,59,48,0.7); animation-play-state: paused; }
    @keyframes hudEscBlink { 0%,60% { opacity: 1; } 61%,100% { opacity: 0.35; } }
    @media (max-width: 600px) { .hud-esc-txt { display: none; } .hud-esc { top: 12px; left: 12px; } }
    @media (prefers-reduced-motion: reduce) { .hud-esc { animation: none; } }

    /* ── Focus lift: raise the explained target ABOVE the scrim (z-440) but
       BELOW the HUD layer (z-505) so the ring/brackets/leader/card always
       render on top of it. Raised target sits at 450 — never above the HUD. */
    .gtour-focus { position: relative !important; z-index: 450 !important; isolation: isolate; }
    .gtour-focus::before { content: ''; position: absolute; inset: -6px; z-index: -1; border-radius: 10px; background: var(--bg); pointer-events: none; }
    /* Light mode: a thin HUD-line outline keeps the raised control legible
       against the softer scrim. */
    [data-theme="light"] .gtour-focus::before { box-shadow: 0 0 0 1px var(--hud-line); }
    #gedMenuGroup.gtour-focus::before { inset: -8px; border-radius: 14px; }
    .ged-header.gtour-above-scrim { z-index: 450 !important; }
    .ged-header.gtour-above-scrim .ged-hctl:not(.gtour-focus),
    .ged-header.gtour-above-scrim .ged-menu-group:not(.gtour-focus) { opacity: 0.35; transition: opacity 0.25s var(--hover-ease); }

    /* ── Segmented progress (one per step) ── */
    .hud-progress { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9; pointer-events: none;
      display: flex; gap: 5px; }
    .hud-progress i { width: 26px; height: 4px; background: rgba(var(--hud),0.2); border: 1px solid rgba(var(--hud),0.35); }
    .hud-progress i.done { background: rgba(var(--hud),0.55); }
    .hud-progress i.active { background: rgb(var(--hud)); box-shadow: 0 0 8px 1px rgba(var(--hud),0.9); }

    /* ── Control dock (HUD style) ── */
    .gtour-dock.hud-dock { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 9; pointer-events: auto;
      display: flex; align-items: center; gap: 12px; background: rgba(4,12,18,0.85);
      -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
      border: 1px solid rgba(var(--hud),0.4); border-radius: 4px; padding: 9px 12px;
      box-shadow: 0 0 20px rgba(var(--hud),0.25), 0 16px 40px rgba(0,0,0,0.5); }
    .gtour-controls { display: flex; gap: 8px; }
    .gtour-controls button { cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 700;
      letter-spacing: 0.06em; text-transform: uppercase;
      display: inline-flex; align-items: center; gap: 7px;
      border-radius: 3px; padding: 9px 14px; border: 1px solid rgba(var(--hud),0.4); background: rgba(var(--hud),0.06); color: rgba(var(--hud),0.95);
      transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, opacity 0.2s; }
    .gtour-controls button:hover { background: rgba(var(--hud),0.16); box-shadow: 0 0 10px rgba(var(--hud),0.4); }
    .gtour-controls button svg { width: 15px; height: 15px; }
    .gtour-controls .gtour-next { background: rgba(var(--hud),0.18); border-color: rgb(var(--hud)); box-shadow: 0 0 12px rgba(var(--hud),0.5); }
    /* Back disabled on step 1. */
    .gtour-controls #gtourBackBtn:disabled { opacity: 0.4; pointer-events: none; }
    /* End button is RED in both themes (red glow on hover + red-tinted bg). */
    .gtour-controls .gtour-end { color: #ff3b30; border-color: rgba(255,59,48,0.6); background: rgba(255,59,48,0.12); box-shadow: none; }
    .gtour-controls .gtour-end:hover { background: rgba(255,59,48,0.2); box-shadow: 0 0 12px rgba(255,59,48,0.55); border-color: #ff3b30; }
    [data-theme="light"] .gtour-controls .gtour-end { color: #d62828; border-color: rgba(214,40,40,0.6); background: rgba(214,40,40,0.12); }
    [data-theme="light"] .gtour-controls .gtour-end:hover { background: rgba(214,40,40,0.2); box-shadow: 0 0 12px rgba(214,40,40,0.5); border-color: #d62828; }

    /* ── Boot / complete overlay ── */
    .hud-boot { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: none;
      align-items: center; justify-content: center; background: var(--hud-boot-bg); }
    .hud-boot.on { display: flex; }
    .hud-boot-txt { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.1rem, 3.5vw, 2rem);
      letter-spacing: 0.3em; color: rgb(var(--hud)); text-shadow: 0 0 14px rgba(var(--hud),0.8); text-transform: uppercase; }
    .hud-boot-sweep { position: absolute; left: 0; right: 0; height: 2px; top: 0;
      background: linear-gradient(90deg, transparent, rgb(var(--hud)), transparent); box-shadow: 0 0 14px 3px rgba(var(--hud),0.8);
      animation: hudBootSweep 0.9s ease-in-out infinite; }
    @keyframes hudBootSweep { 0% { top: 0; } 100% { top: 100%; } }

    /* ── MISSION COMPLETE ending — centered HUD panel + accent ripple ── */
    .hud-complete { position: fixed; inset: 0; z-index: 600; pointer-events: none; display: none;
      align-items: center; justify-content: center; }
    .hud-complete.on { display: flex; }
    .hud-complete.fade { opacity: 0; transition: opacity 0.6s var(--hover-ease); }
    .hud-complete-panel { position: relative; min-width: min(360px, calc(100vw - 48px)); max-width: calc(100vw - 48px);
      padding: 28px 34px; text-align: center; overflow: hidden;
      background: var(--hud-panel-bg, rgba(8,18,32,0.9)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
      border: 1px solid rgba(var(--hud),0.5); box-shadow: 0 0 30px rgba(var(--hud),0.4), 0 24px 60px rgba(0,0,0,0.55);
      animation: hudCompleteIn 0.5s var(--hover-ease) both; }
    @keyframes hudCompleteIn {
      0% { opacity: 0; transform: translateY(8px) scale(0.96); }
      40% { opacity: 1; }
      100% { opacity: 1; transform: none; }
    }
    /* glitch-in flicker on the title */
    .hud-complete-title { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.3rem, 4vw, 2.1rem);
      font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: rgb(var(--hud));
      text-shadow: 0 0 16px rgba(var(--hud),0.75); animation: hudGlitch 0.28s steps(2) 1; }
    .hud-complete-sub { font-size: 14px; line-height: 1.5; color: #e6f6ff; margin-top: 12px; letter-spacing: 0.02em; }
    [data-theme="light"] .hud-complete-sub { color: #e8fff0; }
    /* scan line sweeping down the panel */
    .hud-complete-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
      background: linear-gradient(90deg, transparent, var(--hud-line), transparent);
      box-shadow: 0 0 12px 2px rgba(var(--hud),0.7); animation: hudCompleteScan 1.4s ease-in-out 0.2s 2; }
    @keyframes hudCompleteScan { 0% { top: 0; opacity: 0.2; } 50% { opacity: 1; } 100% { top: 100%; opacity: 0.2; } }
    /* expanding accent ripple behind the panel */
    .hud-complete-ripple { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%;
      transform: translate(-50%,-50%); border: 2px solid rgb(var(--hud)); opacity: 0.9; pointer-events: none;
      animation: hudRipple 1.1s ease-out 1; }
    @keyframes hudRipple { to { width: 80vmin; height: 80vmin; opacity: 0; } }

    /* ══ MISSION ABORTED ending (red over the theme) ══
       --abort-line is the page-line red (theme-aware); the panel stays dark
       glass with red accents (#ff4b3a). Only applied while .gtour.abort. */
    .gtour.abort { --abort-line: #ff3b30; }
    [data-theme="light"] .gtour.abort { --abort-line: #d62828; }
    /* Turn the HUD page lines red during abort. */
    .gtour.abort .hud-br,
    .gtour.abort .hud-pbr { border-color: var(--abort-line) !important; box-shadow: 0 0 8px rgba(255,75,58,0.7) !important; }
    .gtour.abort .hud-ring-circle,
    .gtour.abort .hud-ring-ticks line { stroke: var(--abort-line) !important; }
    .gtour.abort .hud-leader-path { stroke: var(--abort-line) !important; filter: drop-shadow(0 0 5px rgba(255,75,58,0.7)); }
    .gtour.abort .hud-leader-dot { fill: var(--abort-line) !important; }
    .gtour.abort .hud-cd-arc { stroke: var(--abort-line) !important; }

    /* (a) HUD flicker 2–3× */
    .gtour.abort-flicker .hud-reticle,
    .gtour.abort-flicker .hud-leader,
    .gtour.abort-flicker .hud-panel,
    .gtour.abort-flicker .hud-countdown { animation: hudAbortFlicker 0.36s steps(1) 1; }
    @keyframes hudAbortFlicker { 0%,100%{opacity:1} 15%{opacity:0.15} 30%{opacity:1} 45%{opacity:0.25} 60%{opacity:1} 80%{opacity:0.4} }

    /* (b) collapse brackets/ring/leader/dial inward + fade */
    .gtour.abort-collapse .hud-reticle,
    .gtour.abort-collapse .hud-leader,
    .gtour.abort-collapse .hud-panel,
    .gtour.abort-collapse .hud-countdown {
      transition: transform 0.45s var(--hover-ease), opacity 0.45s var(--hover-ease);
      transform: scale(0.1); opacity: 0;
    }
    .gtour.abort-collapse .hud-reticle { transform-origin: center; }

    /* (c) red scan line sweeping top → bottom */
    .hud-abort-scan { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 602; pointer-events: none; opacity: 0;
      background: linear-gradient(90deg, transparent, #ff3b30, transparent);
      box-shadow: 0 0 16px 3px rgba(255,59,48,0.85); }
    [data-theme="light"] .hud-abort-scan { background: linear-gradient(90deg, transparent, #d62828, transparent); }
    .hud-abort-scan.run { animation: hudAbortScan 0.6s linear 1; }
    @keyframes hudAbortScan { 0% { top: 0; opacity: 1; } 100% { top: 100%; opacity: 1; } }

    /* (d) centered MISSION ABORTED panel — dark glass, red accents, glitch-in */
    .hud-abort { position: fixed; inset: 0; z-index: 603; pointer-events: none; display: none;
      align-items: center; justify-content: center; }
    .hud-abort.on { display: flex; }
    .hud-abort-panel { position: relative; min-width: min(340px, calc(100vw - 48px)); max-width: calc(100vw - 48px);
      padding: 26px 34px; text-align: center; overflow: hidden;
      background: var(--hud-panel-bg, rgba(8,18,32,0.92)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
      border: 1px solid rgba(255,75,58,0.6); box-shadow: 0 0 30px rgba(255,75,58,0.4), 0 24px 60px rgba(0,0,0,0.55); }
    .hud-abort-panel .hud-pbr { border-color: #ff4b3a; box-shadow: 0 0 6px rgba(255,75,58,0.7); }
    .hud-abort.on .hud-abort-panel { animation: hudCompleteIn 0.45s var(--hover-ease) both; }
    .hud-abort-title { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.3rem, 4vw, 2.1rem);
      font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #ff4b3a;
      text-shadow: 0 0 16px rgba(255,75,58,0.8); }
    .hud-abort.glitch .hud-abort-title { animation: hudGlitch 0.3s steps(2) 2; }
    .hud-abort-sub { font-size: 14px; line-height: 1.5; color: #ffd9d4; margin-top: 10px; letter-spacing: 0.04em;
      font-family: ui-monospace, Consolas, monospace; }

    /* (e) CRT power-off: squeeze the whole tour to a horizontal line + fade */
    .gtour.abort-crt { animation: hudCrtOff 0.45s cubic-bezier(0.6,0,0.4,1) forwards; transform-origin: center; }
    @keyframes hudCrtOff {
      0% { transform: scaleY(1) scaleX(1); opacity: 1; }
      55% { transform: scaleY(0.012) scaleX(1); opacity: 1; }
      80% { transform: scaleY(0.012) scaleX(0.35); opacity: 0.9; }
      100% { transform: scaleY(0.012) scaleX(0); opacity: 0; }
    }

    @media (prefers-reduced-motion: reduce) {
      .hud-abort.on .hud-abort-panel,
      .hud-abort.glitch .hud-abort-title { animation: none !important; }
      .gtour.abort-crt { animation: none !important; }
      .gtour.abort-flicker .hud-reticle,
      .gtour.abort-flicker .hud-leader,
      .gtour.abort-flicker .hud-panel,
      .gtour.abort-flicker .hud-countdown { animation: none !important; }
    }

    @media (max-width: 600px) {
      .gtour-dock.hud-dock { bottom: 14px; width: min(400px, calc(100vw - 20px)); flex-wrap: wrap; justify-content: center; }
      .gtour-controls { width: 100%; justify-content: center; }
      .hud-progress { bottom: 118px; }
      .hud-dial { display: none; }
      /* Countdown shrinks on mobile and lifts clear of the taller dock. */
      .hud-countdown { width: 72px; height: 72px; left: 12px; bottom: 160px; }
      .hud-cd-num { font-size: 15px; }
      .hud-cd-label { font-size: 7px; }
    }
    @media (prefers-reduced-motion: reduce) {
      .hud-dial-arc, .hud-dial-arc2, .hud-ring, .hud-boot-sweep { animation: none !important; }
      .hud-reticle.lock .hud-br, .hud-leader.draw .hud-leader-path, .hud-panel.glitch { animation: none !important; }
      .hud-leader-path { stroke-dashoffset: 0 !important; }
      .hud-complete-panel, .hud-complete-title, .hud-complete-scan, .hud-complete-ripple { animation: none !important; }
      .hud-complete.fade { transition: none; }
    }

/* New sticky header: lift above the scrim while a header control is the target */
.site-header.gtour-above-scrim { z-index: 450 !important; }
.site-header.gtour-above-scrim .header-logo,
.site-header.gtour-above-scrim .header-nav,
.site-header.gtour-above-scrim .header-actions > *:not(.gtour-focus) { opacity: 0.35; transition: opacity 0.25s ease; }


/* Spotlight window (tour.js cutWindow): the scrim has a clear hole around the
   target; this draws a bright outline and soft glow around that hole. */
.gtour-win { position: fixed; z-index: 441; pointer-events: none; border-radius: 8px; opacity: 0;
  border: 2px solid var(--hud-line, #22D3EE);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18), 0 0 28px rgba(34, 211, 238, 0.35);
  transition: opacity 0.25s ease, left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease; }
.gtour-win.on { opacity: 1; }
[data-theme="light"] .gtour-win { border-color: #0E7490; box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.16), 0 0 24px rgba(14, 116, 144, 0.28); }
@media (prefers-reduced-motion: reduce) { .gtour-win { transition: none; } }


/* Spotlight v2: the outlined window's huge shadow dims everything else, so the
   box being explained is shown at full brightness in every browser. */
.gtour-scrim.gtour-scrim--win { background: transparent !important; }
.gtour-win.on {
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18), 0 0 28px rgba(34, 211, 238, 0.35), 0 0 0 200vmax rgba(0, 0, 0, 0.65);
}
[data-theme="light"] .gtour-win.on {
  box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.16), 0 0 24px rgba(14, 116, 144, 0.28), 0 0 0 200vmax rgba(8, 24, 14, 0.40);
}


/* ═══ Walkthrough on phones: card docked at the bottom, compact chrome ═══ */
@media (max-width: 600px) {
  .gtour .hud-panel { position: fixed !important; left: 10px !important; right: 10px !important; top: auto !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important; width: auto !important; max-height: 36vh; overflow-y: auto; padding: 12px 14px !important; }
  .gtour .hud-ptitle { font-size: 16px !important; }
  .gtour .hud-pbody { font-size: 14px !important; line-height: 1.45; }
  .gtour .hud-readouts { display: none !important; }
  .gtour .hud-leader { display: none !important; }
  .gtour-dock.hud-dock { bottom: calc(10px + env(safe-area-inset-bottom)) !important; padding: 6px !important; gap: 6px !important; }
  .gtour-controls button { min-height: 44px; padding: 0 14px; }
  .hud-progress { bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
  .hud-progress i { width: 18px; height: 3px; }
  .hud-countdown { display: none !important; }
  .hud-ruler { display: none !important; }
  .hud-esc { top: auto !important; bottom: auto !important; top: 10px !important; right: 10px; left: auto !important; }
}
