/* ── Reset & Tokens ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0b0d12;
    --bg-alt:    #0e1018;
    --card:      #13161e;
    --border:    #1c2030;
    --border-hi: #2a2f42;
    --blue:      #2D6DB5;
    --blue-h:    #3A7EC6;
    --blue-lo:   #7FB3E8;
    --blue-dim:  rgba(45,109,181,0.10);
    --amber:     #F0A500;
    --amber-h:   #FFB520;
    --amber-dim: rgba(240,165,0,0.10);
    --pink:      #FF1493;
    --yellow:    #FFE600;
    --red:       #CC2222;
    --green:     #4CAF72;
    --text:      #e8eaf0;
    --text-2:    #8892a4;
    --text-3:    #434a5e;
    --text-dim:  #667086;
    --font:      'Inter', system-ui, sans-serif;
    --r:         8px;
    --r-lg:      14px;
    --planner-nav-h: 58px;
    --planner-panel-w: 280px;
    --planner-status-h: 38px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; }
a   { color: inherit; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav-wrapper {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11,13,18,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.nav-wrapper.scrolled { box-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.planner-body {
    height: 100vh;
    overflow: hidden;
}
.planner-nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    height: var(--planner-nav-h);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(9, 12, 18, 0.94);
    box-shadow: 0 12px 36px rgba(0,0,0,0.32);
    pointer-events: auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.planner-nav {
    max-width: none;
    height: var(--planner-nav-h);
    padding: 0 16px;
    gap: 16px;
    align-items: center;
    flex-wrap: nowrap;
    pointer-events: auto;
}
.planner-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 2px;
}
.planner-title strong,
.mission-name-input {
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
}
.mission-name-input {
    width: min(260px, 24vw);
    height: 24px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    outline: none;
}
.mission-name-input:hover,
.mission-name-input:focus {
    border-bottom-color: rgba(240,165,0,0.55);
}
.planner-nav .nav-logo,
.planner-mode-label,
.planner-nav .nav-actions {
    pointer-events: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}
.planner-nav .nav-logo {
    height: var(--planner-nav-h);
    padding: 0;
}
.planner-mode-label {
    height: auto;
    display: block;
    padding: 0;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.planner-nav .nav-actions {
    position: static;
    gap: 8px;
    margin-left: auto;
    padding: 0;
}
.planner-logout-form {
    margin: 0;
}
.planner-nav .btn {
    height: 34px;
    padding: 0 12px;
}
.planner-save-state,
.planner-credit-pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.planner-save-state::before {
    content: '';
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(76,175,114,0.12);
}
.planner-save-state.is-unsaved::before {
    background: var(--amber);
    box-shadow: 0 0 0 3px rgba(240,165,0,0.14);
}
.planner-save-state.is-error::before {
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(204,34,34,0.14);
}
.planner-credit-pill {
    color: var(--amber);
    border-color: rgba(240,165,0,0.24);
    background: rgba(240,165,0,0.08);
}
.planner-action-btn {
    min-width: 58px;
}
.planner-nav .btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 60px;
    flex-wrap: wrap;
}
.nav-logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
    font-size: 19px; font-weight: 800; letter-spacing: -0.5px;
    flex-shrink: 0;
}
.nav-icon { width: 26px; height: 26px; border-radius: 6px; }
.logo-fly  { color: var(--blue); }
.logo-path { color: var(--amber); }

.nav-links { display: flex; list-style: none; gap: 24px; }
.nav-links a {
    color: var(--text-2); text-decoration: none;
    font-size: 14px; font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.nav-toggle {
    display: none; flex-direction: column;
    justify-content: center; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 6px 4px; margin-left: auto;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: all 0.25s;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 18px; border-radius: var(--r);
    font-size: 14px; font-weight: 600; font-family: var(--font);
    cursor: pointer; text-decoration: none; border: none;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
    white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(0.96); }
.btn-lg     { padding: 13px 28px; font-size: 15px; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-h); }

.btn-amber { background: var(--amber); color: #1a1200; }
.btn-amber:hover { background: var(--amber-h); }

.btn-ghost {
    background: transparent; color: var(--text-2);
    border: 1px solid var(--border-hi);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }

.btn-social {
    width: 100%;
    margin-bottom: 18px;
    background: #fff;
    color: #1f2328;
    border: 1px solid rgba(255,255,255,0.18);
}
.btn-social:hover { background: #f3f4f6; }

/* Amber pulse glow on the primary CTA */
.pulse-amber {
    animation: amberGlow 2.8s ease-in-out infinite;
}
@keyframes amberGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240,165,0,0.5); }
    50%       { box-shadow: 0 0 18px 6px rgba(240,165,0,0); }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    padding: 96px 0 80px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 70% 50% at 30% 0%,
        rgba(45,109,181,0.12) 0%, transparent 70%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 56px;
    align-items: center;
}
.hero-inner > * { min-width: 0; }
.planner-workspace {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    padding: var(--planner-nav-h) 0 0;
    display: flex;
    align-items: stretch;
    background: var(--bg);
}
.planner-inner {
    display: block;
    width: 100%;
    max-width: none;
    height: calc(100vh - var(--planner-nav-h));
    padding: 0;
}
.planner-inner .hero-visual {
    width: 100%;
    height: calc(100vh - var(--planner-nav-h));
    min-height: calc(100vh - var(--planner-nav-h));
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
    transform: none !important;
    transition: none;
    will-change: auto;
}
.planner-inner #mapBg {
    right: var(--planner-panel-w);
}

/* ── Hero text ───────────────────────────────────────────────────────────── */
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(45,109,181,0.09);
    border: 1px solid rgba(45,109,181,0.25);
    color: var(--blue-lo);
    font-size: 12px; font-weight: 600;
    padding: 5px 14px; border-radius: 100px;
    margin-bottom: 24px;
    animation: fadeDown 0.6s ease both;
}
.badge-dot {
    width: 7px; height: 7px;
    background: var(--amber); border-radius: 50%;
    animation: blink 2.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.7); }
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
    animation: fadeDown 0.6s ease 0.1s both;
}

/* Animated gradient on the second line */
.title-gradient {
    background: linear-gradient(90deg,
        var(--blue-lo) 0%, var(--amber) 50%, var(--blue-lo) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s linear infinite;
}
@keyframes gradientShift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 420px;
    animation: fadeDown 0.6s ease 0.2s both;
}

.hero-ctas {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 24px;
    animation: fadeDown 0.6s ease 0.3s both;
}

.hero-proof {
    font-size: 12px;
    color: var(--text-3);
    animation: fadeDown 0.6s ease 0.4s both;
}
.proof-num {
    color: var(--amber);
    font-weight: 700;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: none; }
}

/* ── Hero SVG visualization ──────────────────────────────────────────────── */
.hero-visual {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border-hi);
    box-shadow: 0 0 0 1px rgba(45,109,181,0.08),
                0 24px 64px rgba(0,0,0,0.6);
    animation: fadeUp 0.7s ease 0.2s both;
    transition: transform 0.08s linear;
    will-change: transform;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

/* Satellite map tile background */
#mapBg {
    position: absolute;
    top: 0;
    right: var(--planner-panel-w);
    bottom: 0;
    left: 0;
    z-index: 0;
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
        #0b0d12;
    background-size: 18px 18px, 18px 18px, auto;
}
#mapBg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.24);
    pointer-events: none;
    z-index: 500;
}
.leaflet-control-attribution {
    font-size: 8px !important;
    opacity: 0.4;
    background: transparent !important;
    color: #aaa !important;
}
.leaflet-control-attribution a { color: #aaa !important; }

/* Leaflet core layout fallback. Keeps map tiles positioned if CDN CSS is unavailable. */
#mapBg.leaflet-container {
    overflow: hidden;
    touch-action: none;
}
#mapBg .leaflet-pane,
#mapBg .leaflet-tile,
#mapBg .leaflet-marker-icon,
#mapBg .leaflet-marker-shadow,
#mapBg .leaflet-tile-container,
#mapBg .leaflet-pane > svg,
#mapBg .leaflet-pane > canvas,
#mapBg .leaflet-zoom-box,
#mapBg .leaflet-image-layer,
#mapBg .leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}
#mapBg .leaflet-tile {
    user-select: none;
    -webkit-user-drag: none;
}
#mapBg .leaflet-overlay-pane {
    z-index: 560;
}
#mapBg .leaflet-marker-pane {
    z-index: 610;
}
#mapBg .leaflet-control-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
#mapBg .leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
}
#mapBg .leaflet-bottom {
    position: absolute;
    right: 0;
    bottom: 0;
}

#missionSvg {
    display: block; flex: 1; min-width: 0; height: auto; position: relative; z-index: 1;
    pointer-events: none;
}
#missionSvg.draw-active { pointer-events: auto; }
#polyHandles { pointer-events: auto; }
.poly-handle { cursor: move; }
.mp-panel   { position: relative; z-index: 1; }
.draw-toolbar { z-index: 2; }

/* Custom map zoom buttons */
.map-zoom-ctrl {
    position: absolute;
    bottom: calc(var(--planner-status-h) + 58px);
    left: 12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: auto;
}
.map-zoom-ctrl button {
    width: 28px;
    height: 28px;
    background: rgba(10, 14, 22, 0.82);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #ccc;
    font-size: 17px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}
.map-zoom-ctrl button:hover {
    background: rgba(0, 212, 255, 0.16);
    border-color: rgba(0, 212, 255, 0.45);
    color: #00D4FF;
}
.map-zoom-ctrl button:active {
    background: rgba(0, 212, 255, 0.28);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.map-tools {
    position: absolute;
    left: 12px;
    bottom: calc(var(--planner-status-h) + 12px);
    z-index: 3;
    pointer-events: auto;
}
.map-tool-buttons {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(9, 12, 18, 0.84);
    box-shadow: 0 10px 24px rgba(0,0,0,0.34);
}
.map-tool-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.map-tool-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.map-tool-btn.active,
.map-tool-btn:hover {
    background: var(--amber);
    color: #1a1200;
}
.map-tools-panel {
    position: absolute;
    left: 0;
    bottom: 48px;
    width: 320px;
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(9, 12, 18, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 42px rgba(0,0,0,0.42);
}
.map-tools-panel[hidden] {
    display: none;
}

.map-style-tool {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}
.map-style-tool label {
    padding-left: 4px;
    color: rgba(232,234,240,0.72);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.map-style-tool select {
    height: 30px;
    min-width: 150px;
    padding: 0 28px 0 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
    color: var(--text);
    font: 700 12px var(--font);
    cursor: pointer;
    outline: none;
}
.map-style-tool select:focus {
    border-color: rgba(240,165,0,0.7);
    box-shadow: 0 0 0 2px rgba(240,165,0,0.16);
}
.map-style-tool option {
    background: #10141d;
    color: var(--text);
}

.map-location-search {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.map-location-label {
    color: rgba(232,234,240,0.74);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.map-location-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    box-shadow: none;
}
.map-location-row:focus-within {
    border-color: rgba(240,165,0,0.58);
    box-shadow: 0 0 0 3px rgba(240,165,0,0.12), 0 12px 30px rgba(0,0,0,0.2);
}
.map-location-search input {
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,0.07);
    color: var(--text);
    font: 500 12px var(--font);
    outline: none;
}
.map-location-search input::placeholder {
    color: rgba(232,234,240,0.55);
}
.map-location-search input:focus {
    box-shadow: none;
}
.map-location-search button {
    height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: var(--amber);
    color: #1a1200;
    font: 700 12px var(--font);
    cursor: pointer;
}
.map-location-search.is-loading button {
    opacity: 0.68;
    pointer-events: none;
}
.map-location-status {
    overflow: hidden;
    color: rgba(136,146,164,0.9);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hero-visual.draw-active #mapBg {
    cursor: crosshair;
}
.leaflet-vertex-handle {
    width: 16px;
    height: 16px;
    border: 2px solid #FFE600;
    border-radius: 50%;
    background: rgba(255,20,147,0.9);
    box-shadow: 0 0 0 3px rgba(255,230,0,0.22), 0 4px 14px rgba(0,0,0,0.42);
    cursor: grab;
}
.leaflet-vertex-handle:active {
    cursor: grabbing;
}
.leaflet-mission-label {
    color: #f3f7ff;
    font: 800 16px/1 var(--font);
    text-align: center;
    text-shadow: 0 2px 5px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.8);
    white-space: nowrap;
}
.leaflet-mission-label.is-start {
    color: #ff3333;
}
.leaflet-mission-label.is-end {
    color: #8fc7ff;
}
.leaflet-drone-marker,
.leaflet-capture-pulse {
    background: transparent;
    border: 0;
}
.leaflet-drone-icon {
    --drone-rot: 0deg;
    position: relative;
    width: 42px;
    height: 42px;
    transform: rotate(var(--drone-rot));
    transform-origin: center;
    filter: drop-shadow(0 3px 9px rgba(0,0,0,0.75));
}
.leaflet-drone-icon::before,
.leaflet-drone-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 999px;
    background: rgba(255,230,0,0.9);
    transform: translate(-50%, -50%);
}
.leaflet-drone-icon::before {
    width: 30px;
    height: 3px;
}
.leaflet-drone-icon::after {
    width: 3px;
    height: 30px;
}
.leaflet-drone-icon span,
.leaflet-drone-icon i,
.leaflet-drone-icon b,
.leaflet-drone-icon em {
    position: absolute;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(255,230,0,0.95);
    border-radius: 50%;
    background: rgba(13,20,32,0.86);
    box-shadow: 0 0 0 3px rgba(255,230,0,0.18), 0 0 16px rgba(56,200,255,0.45);
}
.leaflet-drone-icon span { left: 3px; top: 3px; }
.leaflet-drone-icon i { right: 3px; top: 3px; }
.leaflet-drone-icon b { right: 3px; bottom: 3px; }
.leaflet-drone-icon em { left: 3px; bottom: 3px; }
.leaflet-drone-icon span::after,
.leaflet-drone-icon i::after,
.leaflet-drone-icon b::after,
.leaflet-drone-icon em::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-top: 1px solid rgba(56,200,255,0.7);
    border-radius: 50%;
    animation: rotorSpin 0.34s linear infinite;
}
.leaflet-drone-icon > i,
.leaflet-drone-icon > b,
.leaflet-drone-icon > em {
    font-style: normal;
}
.leaflet-capture-pulse span {
    display: block;
    width: 34px;
    height: 34px;
    border: 2px solid rgba(56,200,255,0.9);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(56,200,255,0.55);
    animation: capturePulse 0.9s ease-out forwards;
}
@keyframes rotorSpin {
    to { transform: rotate(360deg); }
}
@keyframes capturePulse {
    0% { opacity: 0.85; transform: scale(0.35); }
    100% { opacity: 0; transform: scale(1.5); }
}

/* Polygon */
.survey-fill {
    fill: rgba(45,109,181,0.06);
    opacity: 0;
    animation: fadeIn 0.6s ease 1.8s both;
}
.survey-border {
    fill: none;
    stroke: var(--pink);
    stroke-width: 1.5;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: drawPath 1.4s ease-out 0.5s both;
}
@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}
@keyframes fadeIn {
    to { opacity: 1; }
}

/* Flight lines */
.fline {
    stroke: var(--yellow);
    stroke-width: 1.2;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0.9;
    animation: drawPath 0.35s ease-out both;
    animation-delay: var(--d);
}

/* Waypoints */
.wp { opacity: 0; }
.wp-start {
    fill: var(--red);
    animation: popIn 0.3s ease 2.1s both;
}
.wp-end {
    fill: var(--blue);
    animation: popIn 0.3s ease 4.1s both;
}
.wp-mid {
    fill: rgba(255,255,255,0.55);
    stroke: var(--yellow);
    stroke-width: 0.8;
    animation: popIn 0.2s ease 4.0s both;
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0); transform-origin: center; }
    60%  { opacity: 1; transform: scale(1.3); }
    to   { opacity: 1; transform: scale(1); }
}

/* Drone (quadcopter group) */
.drone-grp {
    opacity: 0;
    animation: fadeIn 0.3s ease 4.2s both;
}

/* SVG text labels */
.svg-label {
    fill: var(--red);
    font-family: var(--font);
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
    opacity: 0;
    animation: fadeIn 0.3s ease 2.3s both;
}
.svg-label-end {
    fill: var(--blue-lo);
    animation-delay: 4.3s;
}
.edge-lbl {
    fill: rgba(255,255,255,0.55);
    font-family: var(--font);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0;
    animation: fadeIn 0.4s ease 2.5s both;
    pointer-events: none;
}

.svg-area-lbl {
    fill: rgba(255,255,255,0.18);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    text-anchor: middle;
    letter-spacing: 0.3px;
    opacity: 0;
    animation: fadeIn 0.4s ease 2.0s both;
    pointer-events: none;
}

/* Area stat — shares bottom row with front-overlap readout */
.mp-stat-area {
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 0;
}

/* Front-overlap colour coding */
.val-warn { color: #FFB800 !important; }
.val-bad  { color: #FF4444 !important; }

/* Assumption footnote at panel bottom */
.mp-note {
    font-size: 10px;
    color: rgba(160,172,190,0.48);
    padding: 10px 16px 12px;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    line-height: 1.45;
}
.mp-validation {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 12px 16px 0;
    padding: 10px 11px;
    border: 1px solid rgba(76,175,114,0.20);
    border-radius: 7px;
    background: rgba(76,175,114,0.08);
    color: rgba(232,234,240,0.86);
    font-size: 12px;
    font-weight: 700;
}
.planner-status-bar {
    position: absolute;
    left: 0;
    right: var(--planner-panel-w);
    bottom: 0;
    z-index: 4;
    min-height: var(--planner-status-h);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 14px 0 72px;
    border-top: 1px solid rgba(255,255,255,0.10);
    background: rgba(9, 12, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text-2);
    font-size: 12px;
    pointer-events: none;
}
.planner-status-bar strong {
    margin-left: auto;
    color: var(--green);
    font-size: 12px;
}
.planner-empty-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: min(360px, calc(100% - var(--planner-panel-w) - 130px));
    display: grid;
    gap: 6px;
    transform: translate(-50%, -50%);
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(9, 12, 18, 0.82);
    box-shadow: 0 18px 42px rgba(0,0,0,0.38);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: none;
}
.planner-empty-hint[hidden] {
    display: none;
}
.planner-empty-hint strong {
    color: var(--text);
    font-size: 15px;
}
.planner-empty-hint span {
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.45;
}

/* ── Stats bar ───────────────────────────────────────────────────────────── */
.stats-bar {
    background: var(--card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.stats-row {
    display: flex; align-items: center;
    justify-content: center; flex-wrap: wrap;
}
.stat {
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
    padding: 8px 32px;
}
.stat-n {
    font-size: 1.4rem; font-weight: 800;
    color: var(--amber); letter-spacing: -0.5px;
    line-height: 1;
}
.stat-l { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.stat-div {
    width: 1px; height: 36px;
    background: var(--border-hi); flex-shrink: 0;
}

/* ── Section commons ─────────────────────────────────────────────────────── */
.section     { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.eyebrow {
    font-size: 11px; font-weight: 700;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--blue); text-align: center;
    margin-bottom: 10px;
}
.eyebrow-amber { color: var(--amber); }

.sec-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800; letter-spacing: -0.7px;
    text-align: center; line-height: 1.2;
    margin-bottom: 44px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.cards-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}
.cards-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: border-color 0.2s, box-shadow 0.2s;
    /* 3D tilt via CSS custom props set by JS */
    transform: perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
    transition: transform 0.12s linear, border-color 0.2s, box-shadow 0.2s;
    will-change: transform;
}
.card:hover {
    border-color: var(--border-hi);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border-hi);
}

/* Amber-accented feature cards */
.card-accent {
    border-color: rgba(240,165,0,0.18);
    background: linear-gradient(150deg, var(--amber-dim) 0%, var(--card) 60%);
}
.card-accent:hover {
    border-color: rgba(240,165,0,0.38);
    box-shadow: 0 8px 32px rgba(240,165,0,0.08), 0 0 0 1px rgba(240,165,0,0.3);
}

.card-icon { font-size: 1.8rem; margin-bottom: 14px; display: block; }
.card h3   { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.card p    { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ── How it works ────────────────────────────────────────────────────────── */
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
    gap: 0;
}
.step {
    flex: 1;
    text-align: center;
    padding: 0 16px;
}
.step-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 28px rgba(0,0,0,0.5);
}
.step-num {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--blue);
    opacity: 0.18;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 14px;
    transition: opacity 0.4s;
}
.step:hover .step-num { opacity: 0.55; }
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.step p  { font-size: 14px; color: var(--text-2); line-height: 1.75; }

.step-arrow {
    font-size: 1.5rem;
    color: var(--border-hi);
    flex-shrink: 0;
    margin-top: 80px;
    transition: color 0.3s, transform 0.3s;
}
.step-arrow:hover { color: var(--blue-lo); transform: scale(1.2); }

/* ── Waitlist ─────────────────────────────────────────────────────────────── */
.waitlist-section {
    position: relative;
    padding: 96px 0;
    overflow: hidden;
}

/* Animated radial gradient background */
.waitlist-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 70% at 50% 50%,
            rgba(45,109,181,0.10) 0%, transparent 70%);
    animation: wlBgPulse 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes wlBgPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(1.05); }
}

.waitlist-inner {
    position: relative; z-index: 1;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}
.waitlist-title {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 800; letter-spacing: -0.8px;
    line-height: 1.18; margin-bottom: 16px;
}
.waitlist-sub {
    font-size: 1rem; color: var(--text-2);
    line-height: 1.75; margin-bottom: 36px;
}

.wl-row {
    display: flex; gap: 10px;
    margin-bottom: 12px;
}
.wl-input {
    flex: 1; min-width: 0;
    background: var(--card);
    border: 1px solid var(--border-hi);
    border-radius: var(--r);
    padding: 13px 16px;
    font-size: 15px; color: var(--text); font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wl-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(45,109,181,0.15);
}
.wl-input::placeholder { color: var(--text-3); }

.wl-note { font-size: 12px; color: var(--text-3); }
.wl-success {
    display: none;
    margin-top: 16px;
    padding: 14px 20px;
    background: rgba(76,175,114,0.08);
    border: 1px solid rgba(76,175,114,0.2);
    border-radius: var(--r);
    color: var(--green);
    font-size: 14px; font-weight: 500;
}

/* Beta auth and dashboard */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(45,109,181,0.15) 0%, transparent 68%),
        var(--bg);
}
.auth-shell {
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-logo { margin: 0 auto 22px; }
.auth-card,
.dashboard-panel,
.beta-status-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: 0 18px 54px rgba(0,0,0,0.34);
}
.auth-card { padding: 32px; }
.auth-card h1,
.dashboard-hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.7px;
    margin-bottom: 12px;
}
.auth-sub,
.auth-note,
.dashboard-hero p,
.beta-step-list p { color: var(--text-2); }
.auth-sub { margin-bottom: 26px; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}
.auth-note {
    margin-top: 18px;
    font-size: 14px;
    text-align: center;
}
.auth-note a,
.wl-note a {
    color: var(--amber);
    font-weight: 700;
    text-decoration: none;
}
.stacked-form {
    display: grid;
    gap: 10px;
}
.stacked-form label {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.stacked-form input,
.stacked-form select,
.stacked-form textarea {
    width: 100%;
    min-width: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-hi);
    border-radius: var(--r);
    color: var(--text);
    font: 500 15px var(--font);
    padding: 12px 14px;
    outline: none;
}
.stacked-form textarea {
    resize: vertical;
    line-height: 1.5;
}
.stacked-form select option {
    background: #10141d;
    color: var(--text);
}
.stacked-form input:focus,
.stacked-form select:focus,
.stacked-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(45,109,181,0.16);
}
.field-error,
.form-alert {
    padding: 10px 12px;
    border-radius: var(--r);
    font-size: 13px;
    background: rgba(204,34,34,0.1);
    border: 1px solid rgba(204,34,34,0.24);
    color: #ff8d8d;
}
.field-help {
    color: var(--text-3);
    font-size: 12px;
}
.form-alert-success {
    margin-top: 22px;
    background: rgba(76,175,114,0.08);
    border-color: rgba(76,175,114,0.22);
    color: var(--green);
}
.beta-dashboard { min-height: calc(100vh - 60px); }
.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 40px;
}
.text-left { text-align: left; }
.beta-status-panel,
.dashboard-panel { padding: 24px; }
.status-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(76,175,114,0.1);
    border: 1px solid rgba(76,175,114,0.25);
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 18px;
}
.beta-status-panel dl {
    display: grid;
    gap: 14px;
}
.beta-status-panel div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.beta-status-panel dt {
    color: var(--text-2);
    font-size: 13px;
}
.beta-status-panel dd {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    text-align: right;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
}
.dashboard-panel-wide {
    grid-column: 1 / -1;
}
.panel-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.panel-heading-row .survey-intro {
    margin: 6px 0 0;
}
.mission-list {
    display: grid;
    gap: 10px;
}
.mission-list-item {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(360px, 1.4fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: rgba(255,255,255,0.035);
}
.mission-list-item h3 {
    margin: 0 0 4px;
    font-size: 16px;
}
.mission-list-item p {
    margin: 0;
    color: var(--text-2);
    font-size: 12px;
}
.mission-list-item dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.mission-list-item dt {
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.mission-list-item dd {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}
.mission-edit-btn {
    justify-self: end;
}
.empty-state {
    padding: 22px;
    border: 1px dashed var(--border-hi);
    border-radius: var(--r);
    background: rgba(255,255,255,0.025);
}
.empty-state h3 {
    margin: 0 0 6px;
    font-size: 16px;
}
.empty-state p {
    margin: 0;
    color: var(--text-2);
}
.dashboard-panel h2 {
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: 18px;
}
.beta-step-list {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}
.beta-step-list div {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: start;
}
.beta-step-list span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue-dim);
    color: var(--blue-lo);
    font-weight: 800;
}
.survey-intro {
    margin: -8px 0 20px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.65;
}
.survey-form {
    gap: 18px;
}
.survey-question {
    display: grid;
    gap: 8px;
}
.survey-question-radio > div {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}
.survey-question-radio > div > div {
    margin: 0;
}
.survey-question-radio > div > div > label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 42px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.survey-question-radio > div > div > label:hover {
    border-color: var(--border-hi);
    background: rgba(45,109,181,0.08);
}
.survey-question input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--amber);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    background: var(--card);
}
.footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-links {
    display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap;
}
.footer-links a {
    font-size: 13px; color: var(--text-2);
    text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
    font-size: 12px; color: var(--text-3);
    width: 100%; text-align: center; margin-top: 8px;
}

/* ── Reveal animation ────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-sub    { max-width: 100%; }
    .hero-ctas   { justify-content: center; }
    .hero-visual { max-width: 600px; margin: 0 auto; }
    .hero-proof  { justify-content: center; }
    .cards-2     { grid-template-columns: 1fr; }

    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
        display: flex; flex-direction: column; gap: 14px;
        width: 100%; order: 3;
        padding: 12px 0 16px;
        border-top: 1px solid var(--border);
    }
    .nav-actions.open {
        display: flex; flex-direction: column; gap: 8px;
        width: 100%; order: 4; padding-bottom: 14px;
    }
    .nav-actions.open .btn { width: 100%; justify-content: center; }
    .planner-nav .nav-links,
    .planner-nav .nav-actions {
        display: flex;
    }
    .planner-nav .nav-actions {
        width: auto;
        order: initial;
        padding: 0;
        position: static;
    }
    .planner-nav .nav-actions .btn {
        width: auto;
    }
    .planner-nav .nav-toggle {
        display: none;
    }
    .planner-nav {
        gap: 10px;
        padding: 0 10px;
    }
    .planner-nav .nav-logo {
        font-size: 17px;
    }
    .planner-mode-label {
        display: none;
    }
    .planner-title strong,
    .mission-name-input {
        font-size: 13px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .planner-save-state,
    .planner-action-btn {
        display: none;
    }
    .planner-credit-pill {
        height: 30px;
        padding: 0 8px;
        font-size: 11px;
    }
    .planner-inner.hero-inner {
        grid-template-columns: none;
        text-align: left;
    }
    .planner-inner .hero-visual {
        max-width: none;
        margin: 0;
    }
    .dashboard-hero,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-hero {
        padding-top: 44px;
    }
    .panel-heading-row,
    .mission-list-item {
        grid-template-columns: 1fr;
    }
    .panel-heading-row {
        display: grid;
    }
    .mission-list-item dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mission-edit-btn {
        justify-self: stretch;
    }
}

@media (max-width: 600px) {
    .section   { padding: 56px 0; }
    .hero      { padding: 56px 0 48px; }
    .steps     { flex-direction: column; align-items: center; gap: 8px; }
    .step      { max-width: 480px; width: 100%; }
    .step-arrow{ transform: rotate(90deg); margin: 0; }
    .step-arrow:hover { transform: rotate(90deg) scale(1.2); }
    .wl-row    { flex-direction: column; }
    .stat-div  { display: none; }
    .stat      { padding: 6px 18px; }
    .footer-inner { justify-content: center; }
    .footer-links { margin-left: 0; justify-content: center; }
}

/* ── Global reach section ────────────────────────────────────────────────── */
.reach-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 15px;
    margin: -8px auto 36px;
    max-width: 520px;
}
.reach-grid { max-width: 880px; margin: 0 auto; }
.reach-map-wrap {
    position: relative;
    width: 100%;
}
.reach-map-svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.reach-tip {
    position: absolute;
    background: rgba(10,14,24,0.96);
    border: 1px solid rgba(255,210,0,0.25);
    color: rgba(220,226,237,0.9);
    font-size: 13px;
    padding: 6px 13px;
    border-radius: 7px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
    backdrop-filter: blur(10px);
}
.reach-tip strong { color: #FFE600; }
@keyframes reachPulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    70%  { transform: scale(2.2); opacity: 0;   }
    100% { transform: scale(2.2); opacity: 0;   }
}
.reach-ring {
    animation: reachPulse 2.8s ease-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}
.reach-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 28px;
    max-width: 880px;
    margin: 18px auto 0;
}
.reach-list-row {
    display: grid;
    grid-template-columns: 18px 20px 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rln {
    font-size: 10px;
    font-family: 'JetBrains Mono','Courier New',monospace;
    color: rgba(255,255,255,0.2);
    text-align: right;
}
.rlf { font-size: 13px; line-height: 1; }
.rlc { font-size: 12px; color: rgba(220,226,237,0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rlv { font-size: 12px; font-weight: 700; color: var(--amber); font-family: 'JetBrains Mono','Courier New',monospace; }
.reach-list-top .rln { color: var(--amber); }
.reach-list-top .rlc { color: rgba(255,230,0,0.85); }
@media (max-width: 700px) { .reach-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .reach-list { grid-template-columns: 1fr; } }
.reach-note {
    text-align: center;
    font-size: 11.5px;
    color: rgba(136,146,164,0.5);
    margin-top: 14px;
}

/* ── Mission parameter panel (right sidebar) ─────────────────────────────── */
.mp-panel {
    width: var(--planner-panel-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(9,11,17,0.98);
    border-left: 1px solid rgba(255,255,255,0.07);
    box-shadow: -18px 0 48px rgba(0,0,0,0.26);
    overflow: hidden;
}
.mp-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.mp-panel-head div {
    display: grid;
    gap: 3px;
}
.mp-panel-head span:first-child,
.mp-section-title {
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}
.mp-panel-head strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.2;
}
.mp-ready-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(76,175,114,0.14);
    flex-shrink: 0;
}
.mp-section {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mp-section-grow {
    flex: 1;
    min-height: 0;
}

/* Drone selector */
.mp-drone-sel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    flex-shrink: 0;
}
.mp-drone-btn {
    flex: 1;
    min-height: 36px;
    padding: 6px 7px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 7px;
    background: rgba(255,255,255,0.035);
    color: rgba(220,226,237,0.76);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    line-height: 1.3;
    text-align: center;
    font-family: system-ui, sans-serif;
}
.mp-drone-btn:hover {
    background: rgba(45,109,181,0.15);
    color: #fff;
    border-color: rgba(45,109,181,0.6);
}
.mp-drone-btn.active {
    background: rgba(45,109,181,0.24);
    border-color: var(--blue);
    color: #fff;
}

/* Stats 2×2 grid */
.mp-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    flex-shrink: 0;
}
.mp-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    min-height: 48px;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.035);
}
.mp-stat-val {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.mp-stat-lbl {
    font-size: 10px;
    color: rgba(160,172,190,0.5);
    line-height: 1;
}
.mp-stat-sep { display: none; }

/* Controls — vertical stack, each takes 1/3 of remaining height */
.mp-controls {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    min-height: 0;
}
.mp-ctrl {
    flex: initial;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 11px 11px 12px;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    background: rgba(255,255,255,0.035);
}
.mp-ctrl:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.mp-ctrl-sep { display: none; }

.mp-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(160,172,190,0.55);
    text-transform: uppercase;
    align-self: flex-start;
}

/* [−] value unit [+] row */
.mp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}
.mp-val-wrap {
    display: flex;
    align-items: baseline;
    gap: 3px;
    min-width: 52px;
    justify-content: center;
}
.mp-num {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.mp-unit {
    font-size: 11px;
    color: rgba(160,172,190,0.45);
    font-weight: 500;
}

/* ± buttons — glowing circles */
.mp-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(45,109,181,0.4);
    background: rgba(45,109,181,0.08);
    color: rgba(255,255,255,0.8);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 1px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    flex-shrink: 0;
    user-select: none;
}
.mp-btn:hover {
    background: rgba(45,109,181,0.25);
    border-color: var(--blue);
    box-shadow: 0 0 12px rgba(45,109,181,0.4);
    color: #fff;
}
.mp-btn:active {
    transform: scale(0.88);
    background: rgba(45,109,181,0.38);
}

/* Filled range slider */
.mp-slider {
    width: 88%;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(
        to right,
        var(--blue) 0%,
        var(--blue) var(--fill, 58%),
        rgba(255,255,255,0.1) var(--fill, 58%),
        rgba(255,255,255,0.1) 100%
    );
}
.mp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--blue);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(45,109,181,0.2);
    transition: box-shadow 0.15s;
}
.mp-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 5px rgba(45,109,181,0.28);
}
.mp-slider::-moz-range-thumb {
    width: 13px; height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--blue);
    cursor: pointer;
}

/* Mobile: stack panel below SVG */
@media (max-width: 700px) {
    .hero-visual {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        transform: none !important;
    }
    #missionSvg {
        flex: none;
        width: 100%;
    }
    #mapBg {
        right: 0;
        bottom: auto;
        aspect-ratio: 520 / 380;
    }
    .map-tools {
        left: 12px;
        bottom: auto;
        top: calc((min(100vw - 64px, 600px) * 0.73077) - 68px);
    }
    .map-tools-panel {
        width: min(320px, calc(100vw - 88px));
    }
    .map-zoom-ctrl {
        bottom: auto;
        top: calc((min(100vw - 64px, 600px) * 0.73077) - 132px);
    }
    .mp-panel {
        width: auto;
        min-width: 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.07);
        flex-direction: column;
    }
    .mp-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mp-ctrl {
        min-width: 0;
        padding: 10px 10px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-right: 1px solid rgba(255,255,255,0.05);
    }
    .mp-ctrl:nth-child(3),
    .mp-ctrl:nth-child(7) { border-right: none; }
    .mp-ctrl:nth-child(5),
    .mp-ctrl:nth-child(7) { border-bottom: none; }
    .mp-stat-sep { display: block; width: 1px; height: 16px; background: rgba(255,255,255,0.1); margin: 0; }
    .mp-stats { flex-direction: row; align-items: center; gap: 0; padding: 8px 16px; }
    .mp-stat { justify-content: center; flex-direction: column; align-items: center; padding: 0 16px 0 0; gap: 2px; }
}

@media (max-width: 420px) {
    .container { padding: 0 20px; }
    .hero-title {
        font-size: 2rem;
        letter-spacing: -0.7px;
    }
    .hero-sub {
        font-size: 0.98rem;
        line-height: 1.65;
    }
    .hero-ctas .btn {
        width: 100%;
    }
    .map-location-row {
        grid-template-columns: 1fr;
    }
    .map-location-search button {
        width: 100%;
    }
    .map-tools {
        top: calc(((100vw - 40px) * 0.73077) - 68px);
    }
    .map-zoom-ctrl {
        top: calc(((100vw - 40px) * 0.73077) - 132px);
    }
    .draw-toolbar {
        gap: 4px;
    }
    .draw-tb-btn {
        padding: 4px 8px;
        font-size: 9px;
    }
    .mp-drone-sel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mp-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 10px;
    }
    .mp-stat {
        padding: 0;
    }
    .mp-stat-area {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    .mp-row {
        gap: 6px;
    }
    .mp-val-wrap {
        min-width: 42px;
    }
    .mp-num {
        font-size: 20px;
    }
    .mp-btn {
        width: 26px;
        height: 26px;
    }
}

/* ── Polygon draw / edit tool ────────────────────────────────────────────── */

.draw-toolbar {
    position: absolute;
    top: 16px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    pointer-events: auto;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(9, 12, 18, 0.82);
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.draw-tb-btn {
    width: 58px;
    min-height: 54px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 5px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: rgba(232,234,240,0.82);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    line-height: 1.1;
    user-select: none;
}
.draw-tb-btn .tool-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: currentColor;
    font-size: 15px;
    line-height: 1;
}
.draw-tb-btn.active,
.draw-tb-btn:hover {
    background: rgba(240,165,0,0.16);
    border-color: rgba(240,165,0,0.55);
    color: var(--amber);
}
.draw-tb-btn:active { transform: scale(0.94); }

.draw-tb-btn--pause {
    border-color: rgba(0,212,255,0.35);
    color: rgba(0,212,255,0.8);
}
.draw-tb-btn--pause:hover {
    background: rgba(0,212,255,0.1);
    border-color: rgba(0,212,255,0.7);
    color: #00D4FF;
}
.draw-tb-btn--pause.is-paused {
    border-color: rgba(0,212,255,0.7);
    background: rgba(0,212,255,0.12);
    color: #00D4FF;
}

/* Crosshair cursor while draw mode is active */
#missionSvg.draw-active { cursor: crosshair !important; }

/* Preview: placed-edges polyline */
.draw-preview-line {
    fill: none;
    stroke: #FFE600;
    stroke-width: 1.4;
    stroke-dasharray: 5 3;
    opacity: 0.8;
    pointer-events: none;
}

/* Rubber band segment from last vertex to cursor */
.draw-rubber {
    stroke: #FFE600;
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: 0.45;
    pointer-events: none;
}

/* Placed vertices while drawing */
.draw-vertex {
    fill: rgba(255,230,0,0.2);
    stroke: #FFE600;
    stroke-width: 1.5;
    pointer-events: none;
}
.draw-vertex-first {
    fill: rgba(255,230,0,0.35);
    stroke-width: 2;
}

/* Snap ring highlighting the first vertex when close enough to close */
.draw-snap-ring {
    fill: none;
    stroke: #FFE600;
    stroke-width: 1.5;
    opacity: 0.7;
    pointer-events: none;
    animation: snapPulse 0.5s ease-in-out infinite alternate;
}
@keyframes snapPulse {
    from { r: 9; opacity: 0.5; }
    to   { r: 12; opacity: 1;  }
}

/* Vertex drag handles */
.poly-handle {
    fill: rgba(255,230,0,0.08);
    stroke: #FFE600;
    stroke-width: 1.5;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.18s, fill 0.12s;
}
#polyHandles:not(:empty) .poly-handle { opacity: 0.5; }
.poly-handle:hover {
    fill: rgba(255,230,0,0.3);
    opacity: 1 !important;
}
.poly-handle:active { cursor: grabbing; }

/* ── Aircraft profiles ───────────────────────────────────────────────────── */
.drones-sub {
    text-align: center;
    color: var(--text-2);
    font-size: 15px;
    margin: -8px auto 40px;
    max-width: 660px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 1040px;
    margin: 0 auto;
}

.profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 132px 1fr;
    min-height: 188px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-card:hover {
    border-color: var(--border-hi);
    box-shadow: 0 10px 32px rgba(0,0,0,0.42);
}
.profile-card--enterprise {
    border-color: rgba(240,165,0,0.18);
}

.profile-img-wrap {
    min-height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1019 0%, #141824 60%, #0e1118 100%);
    position: relative;
}
.profile-img-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 55%, rgba(19,22,30,0.55));
    pointer-events: none;
}
.drone-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}
.profile-card:hover .drone-img { transform: scale(1.035); }

.profile-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.profile-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: var(--blue-lo);
    background: var(--blue-dim);
    border: 1px solid rgba(45,109,181,0.25);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    line-height: 1;
}
.profile-status--enterprise {
    color: var(--amber);
    background: var(--amber-dim);
    border-color: rgba(240,165,0,0.25);
}

.drone-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.profile-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    margin: 0;
    border-top: 1px solid var(--border);
}
.profile-specs div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.profile-specs dt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-3);
}
.profile-specs dd {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    overflow-wrap: anywhere;
}

.profile-note {
    max-width: 680px;
    margin: 18px auto 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
}

@media (max-width: 1024px) {
    .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .profile-card {
        grid-template-columns: 1fr;
    }
    .profile-img-wrap {
        aspect-ratio: 16 / 8;
        min-height: 0;
    }
    .profile-img-wrap::after {
        background: linear-gradient(180deg, transparent 55%, rgba(19,22,30,0.45));
    }
}
@media (max-width: 420px) {
    .profile-info {
        padding: 18px;
    }
    .profile-head {
        flex-direction: column;
        gap: 8px;
    }
    .profile-specs {
        grid-template-columns: 1fr;
    }
}
