/* ============================================
     Feature: Interactive Maps
     Identity: cartography toolkit, GPS coordinates,
     layers panel, mode tabs, developer-doc tone
     ============================================ */

  .crumb {
    padding: 20px 0 0;
    font-size: 13px; color: var(--fg-mute);
    display: flex; gap: 10px; align-items: center;
  }
  .crumb a { color: var(--fg-mute); }
  .crumb a:hover { color: var(--accent); }
  .crumb .sep { opacity: 0.4; }

  /* ─── HERO ─────────────────────── */
  .feat-hero { padding: 48px 0 64px; }
  .feat-hero-grid {
    display: grid; grid-template-columns: 0.9fr 1.3fr; gap: 56px; align-items: center;
  }
  @media (max-width: 1080px) { .feat-hero-grid { grid-template-columns: 1fr; } }
  .feature-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 10px 5px 8px; border-radius: 999px;
    background: color-mix(in oklch, var(--accent) 12%, var(--bg-card));
    border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--border));
    font-size: 11.5px; font-family: "Geist Mono", monospace; letter-spacing: 0.06em;
    color: var(--accent); margin-bottom: 24px;
  }
  .feature-tag::before {
    content: ""; display: inline-block; width: 6px; height: 6px;
    background: var(--accent); border-radius: 50%;
  }
  .feat-hero h1 {
    font-size: clamp(46px, 5.4vw, 72px);
    line-height: 0.98; letter-spacing: -0.035em; font-weight: 600;
    margin: 0 0 24px;
  }
  .feat-hero h1 em {
    font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; letter-spacing: -0.02em;
    color: var(--accent);
  }
  .feat-hero .sub { font-size: 18px; color: var(--fg-dim); max-width: 480px; margin: 0 0 32px; }

  /* coordinate label */
  .coord {
    display: inline-flex; gap: 6px; align-items: center;
    font-family: "Geist Mono", monospace; font-size: 11.5px;
    color: var(--fg-mute);
    padding: 4px 8px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 6px;
  }
  .coord .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

  /* ─── HERO MAP (the operator UI mock) ─────────────────────── */
  .map-stage {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 100px -40px rgba(0,0,0,0.5);
    color: var(--ps-fg);
  }
  .ms-canvas {
    position: absolute; inset: 0;
    background:
      radial-gradient(800px 500px at 30% 40%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 60%),
      radial-gradient(700px 400px at 80% 70%, color-mix(in oklch, var(--gold) 14%, transparent), transparent 60%),
      var(--ps-card);
  }
  .ms-grid {
    position: absolute; inset: 0;
    background-image:
      linear-gradient(to right, color-mix(in oklch, var(--ps-border) 70%, transparent) 1px, transparent 1px),
      linear-gradient(to bottom, color-mix(in oklch, var(--ps-border) 70%, transparent) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
  }
  .ms-routes { position: absolute; inset: 0; width: 100%; height: 100%; }

  /* layers panel (left) */
  .ms-panel {
    position: absolute; top: 18px; left: 18px;
    width: 220px;
    background: color-mix(in oklch, var(--ps-card) 92%, transparent);
    backdrop-filter: blur(12px);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 14px;
    font-size: 12px;
  }
  .ms-panel .ph {
    display: flex; justify-content: space-between; align-items: center;
    font-family: "Geist Mono", monospace; font-size: 10.5px; letter-spacing: 0.1em;
    color: var(--ps-mute); margin-bottom: 12px; text-transform: uppercase;
  }
  .ms-panel .pi {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-top: 1px solid var(--ps-border);
  }
  .ms-panel .pi:first-of-type { border-top: 0; }
  .ms-panel .pi .name { display: flex; align-items: center; gap: 8px; }
  .ms-panel .pi .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
  .ms-panel .pi .dot.g { background: var(--gold); }
  .ms-panel .pi .dot.x { background: oklch(0.97 0.005 90); }
  .ms-panel .pi .tog {
    width: 24px; height: 14px; border-radius: 7px;
    background: var(--accent);
    position: relative;
  }
  .ms-panel .pi .tog::after {
    content: ""; position: absolute; right: 2px; top: 2px;
    width: 10px; height: 10px; border-radius: 50%; background: oklch(0.99 0 0);
  }
  .ms-panel .pi.off .tog { background: var(--ps-border); }
  .ms-panel .pi.off .tog::after { left: 2px; right: auto; }

  /* legend (right) */
  .ms-legend {
    position: absolute; top: 18px; right: 18px;
    background: color-mix(in oklch, var(--ps-card) 92%, transparent);
    backdrop-filter: blur(12px);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 12px 14px; font-size: 11px;
    font-family: "Geist Mono", monospace;
    color: var(--ps-mute);
  }
  .ms-legend > div { padding: 3px 0; }
  .ms-legend strong { color: var(--ps-fg); font-weight: 500; }

  /* pin */
  .ms-pin {
    position: absolute; width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent); border: 3px solid var(--ps-elev);
    box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 50%, transparent),
                0 0 40px color-mix(in oklch, var(--accent) 50%, transparent);
  }
  .ms-pin.g { background: var(--gold); box-shadow: 0 0 0 1px color-mix(in oklch, var(--gold) 50%, transparent), 0 0 40px color-mix(in oklch, var(--gold) 40%, transparent); }
  .ms-pin.x { background: oklch(0.97 0.005 90); box-shadow: 0 0 0 1px oklch(0.97 0.005 90 / 0.5), 0 0 40px oklch(0.97 0.005 90 / 0.4); }
  .ms-pin::before {
    content: ""; position: absolute; inset: -10px; border-radius: 50%;
    background: inherit; opacity: 0.25;
    animation: ring 2.4s ease-out infinite;
  }
  .ms-pin .pin-label {
    position: absolute; top: -32px; left: 50%; transform: translateX(-50%);
    background: var(--ps-card); border: 1px solid var(--ps-border);
    color: var(--ps-fg);
    padding: 3px 8px; border-radius: 6px;
    font-family: "Geist Mono", monospace; font-size: 10px;
    white-space: nowrap;
  }

  /* geofence ring */
  .geofence {
    position: absolute; width: 140px; height: 140px;
    border-radius: 50%;
    border: 1.5px dashed color-mix(in oklch, var(--accent) 60%, transparent);
    background: color-mix(in oklch, var(--accent) 8%, transparent);
  }

  /* compass / hud */
  .ms-hud {
    position: absolute; bottom: 18px; left: 18px;
    display: flex; gap: 8px;
  }
  .ms-hud .chip {
    background: color-mix(in oklch, var(--ps-card) 92%, transparent);
    border: 1px solid var(--ps-border);
    border-radius: 6px;
    padding: 5px 10px;
    font-family: "Geist Mono", monospace; font-size: 11px;
    color: var(--ps-fg);
  }

  /* zoom */
  .ms-zoom {
    position: absolute; bottom: 18px; right: 18px;
    display: flex; flex-direction: column; gap: 1px;
    background: var(--ps-border); padding: 1px; border-radius: 8px;
  }
  .ms-zoom button {
    width: 32px; height: 32px;
    background: var(--ps-card); color: var(--ps-fg);
    border: 0; border-radius: 6px;
    font-size: 16px; cursor: pointer;
  }

  /* ─── FOUR CAPABILITIES ─────────────────────── */
  .caps {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  }
  @media (max-width: 1000px) { .caps { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .caps { grid-template-columns: 1fr; } }
  .cap {
    padding: 28px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .cap-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: color-mix(in oklch, var(--accent) 14%, var(--bg-card));
    border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--border));
    display: grid; place-items: center;
    margin-bottom: 20px;
  }
  .cap h4 { margin: 0 0 8px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
  .cap p { margin: 0; color: var(--fg-mute); font-size: 13.5px; line-height: 1.55; }

  /* ─── MODE TABS ─────────────────────── */
  .modes {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; background: var(--bg-elev);
  }
  .mode-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }
  .mode-tab {
    padding: 22px 28px;
    border-right: 1px solid var(--border);
    cursor: pointer;
    transition: 160ms ease;
    background: transparent; border-top: 0; border-bottom: 0; border-left: 0;
    text-align: left; color: inherit; font: inherit;
  }
  .mode-tab:last-child { border-right: 0; }
  .mode-tab.active { background: var(--bg-elev); }
  .mode-tab .mt-num {
    font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.12em;
    color: var(--fg-mute); margin-bottom: 6px;
  }
  .mode-tab.active .mt-num { color: var(--accent); }
  .mode-tab .mt-name { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
  .mode-tab .mt-desc { font-size: 12.5px; color: var(--fg-mute); margin-top: 4px; }
  .mode-panel { padding: 40px; display: none; }
  .mode-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  @media (max-width: 900px) { .mode-panel.active { grid-template-columns: 1fr; } }
  .mode-panel ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
  .mode-panel li {
    padding: 12px 0; border-bottom: 1px solid var(--border);
    display: grid; grid-template-columns: 18px 1fr; gap: 14px;
    font-size: 14px; color: var(--fg-dim);
  }
  .mode-panel li::before {
    content: "→"; color: var(--accent); font-family: "Geist Mono", monospace;
  }
  .mode-panel .mini-map {
    aspect-ratio: 4/3; background: var(--ps-bg);
    border: 1px solid var(--ps-border); border-radius: 12px;
    position: relative; overflow: hidden;
  }
  .mode-panel .mini-map .ms-canvas { position: absolute; inset: 0; }

  /* ─── SPEC SHEET ─────────────────────── */
  .specs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; background: var(--bg-elev);
  }
  @media (max-width: 800px) { .specs { grid-template-columns: 1fr; } }
  .spec-col { padding: 32px 36px; border-right: 1px solid var(--border); }
  .spec-col:last-child { border-right: 0; }
  @media (max-width: 800px) { .spec-col { border-right: 0; border-bottom: 1px solid var(--border); } .spec-col:last-child { border-bottom: 0; } }
  .spec-col h4 {
    font-family: "Geist Mono", monospace; font-size: 11px;
    letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase;
    margin: 0 0 18px;
  }
  .spec-col dl { margin: 0; }
  .spec-col dt {
    font-family: "Geist Mono", monospace; font-size: 12px;
    color: var(--fg-mute); padding-top: 12px;
  }
  .spec-col dd {
    margin: 4px 0 12px; font-size: 15px;
    border-bottom: 1px solid var(--border); padding-bottom: 12px;
  }
  .spec-col dd:last-of-type { border-bottom: 0; }

  /* ─── API CALLOUT ─────────────────────── */
  .api-block {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center;
  }
  @media (max-width: 900px) { .api-block { grid-template-columns: 1fr; } }
  .code-card {
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    overflow: hidden;
    color: var(--ps-fg);
  }
  .code-card .ch {
    padding: 12px 16px;
    display: flex; gap: 8px; align-items: center;
    border-bottom: 1px solid var(--ps-border);
    font-family: "Geist Mono", monospace; font-size: 11.5px;
    color: var(--ps-mute);
  }
  .code-card .ch::before {
    content: "POST"; padding: 3px 8px;
    background: color-mix(in oklch, var(--accent) 20%, var(--ps-card));
    color: var(--accent);
    border: 1px solid color-mix(in oklch, var(--accent) 40%, var(--ps-border));
    border-radius: 4px; font-size: 10.5px; letter-spacing: 0.04em;
  }
  .code-card pre {
    margin: 0; padding: 20px 20px;
    font-family: "Geist Mono", monospace; font-size: 12.5px;
    line-height: 1.65; color: var(--ps-fg);
    overflow-x: auto;
  }
  .code-card .k { color: var(--accent); }
  .code-card .s { color: var(--gold); }
  .code-card .c { color: var(--ps-mute); }
  .code-card .n { color: oklch(0.78 0.13 200); }

  /* ─── PLATFORMS THIS POWERS ─────────────────────── */
  .x-platforms {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  }
  @media (max-width: 900px) { .x-platforms { grid-template-columns: 1fr 1fr; } }
  .xp {
    padding: 16px 18px;
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: 160ms ease;
    display: flex; flex-direction: column; gap: 4px;
  }
  .xp:hover { background: var(--bg-card); transform: translateY(-2px); }
  .xp .id { font-family: "Geist Mono", monospace; font-size: 10.5px; letter-spacing: 0.1em; color: var(--accent); }
  .xp .nm { font-weight: 500; font-size: 14.5px; letter-spacing: -0.005em; }

  /* ─── OTHER FEATURES STRIP ─────────────────────── */
  .other-feats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  }
  @media (max-width: 1000px) { .other-feats { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .other-feats { grid-template-columns: 1fr; } }
  .ofeat {
    padding: 22px;
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: 160ms ease;
  }
  .ofeat:hover { background: var(--bg-card); transform: translateY(-2px); border-color: var(--border-strong); }
  .ofeat .ofid { font-family: "Geist Mono", monospace; font-size: 10.5px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; }
  .ofeat h4 { font-size: 16px; margin: 0 0 4px; font-weight: 500; letter-spacing: -0.005em; }
  .ofeat p { font-size: 12.5px; color: var(--fg-mute); margin: 0; }
