// Stroked SVG icons.
const Ico = (p) => <svg width={p.size||18} height={p.size||18} viewBox="0 0 24 24" fill="none"
  stroke="currentColor" strokeWidth={p.sw||1.7} strokeLinecap="round" strokeLinejoin="round">{p.children}</svg>;

const Icons = {
  map:       (p={}) => <Ico {...p}><path d="M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2z"/><path d="M9 4v14M15 6v14"/></Ico>,
  search:    (p={}) => <Ico {...p}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></Ico>,
  chart:     (p={}) => <Ico {...p}><path d="M3 3v18h18"/><path d="M7 15l4-4 3 3 5-6"/></Ico>,
  people:    (p={}) => <Ico {...p}><circle cx="9" cy="8" r="4"/><path d="M2 22c0-4 3-7 7-7s7 3 7 7"/><circle cx="17" cy="6" r="3"/><path d="M22 20c0-3-2-5-5-5"/></Ico>,
  layers:    (p={}) => <Ico {...p}><path d="m12 2 10 5-10 5L2 7l10-5z"/><path d="m2 12 10 5 10-5M2 17l10 5 10-5"/></Ico>,
  building:  (p={}) => <Ico {...p}><rect x="4" y="3" width="16" height="18" rx="1"/><path d="M9 7h.01M13 7h.01M9 11h.01M13 11h.01M9 15h.01M13 15h.01"/></Ico>,
  briefcase: (p={}) => <Ico {...p}><rect x="3" y="7" width="18" height="13" rx="2"/><path d="M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18"/></Ico>,
  doc:       (p={}) => <Ico {...p}><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M9 13h6M9 17h4"/></Ico>,
  settings:  (p={}) => <Ico {...p}><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1A1.7 1.7 0 0 0 9 19.4a1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1A1.7 1.7 0 0 0 4.6 9a1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></Ico>,
  arrow:     (p={}) => <Ico {...p}><path d="M5 12h14M13 5l7 7-7 7"/></Ico>,
  check:     (p={}) => <Ico {...p} sw={2.5}><path d="m5 12 5 5L20 7"/></Ico>,
  chevron:   (p={}) => <Ico {...p}><path d="m9 18 6-6-6-6"/></Ico>,
  download:  (p={}) => <Ico {...p}><path d="M12 3v12m0 0-4-4m4 4 4-4"/><path d="M5 21h14"/></Ico>,
  bell:      (p={}) => <Ico {...p}><path d="M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10 21a2 2 0 0 0 4 0"/></Ico>,
  pin:       (p={}) => <Ico {...p}><path d="M12 22s7-7 7-12a7 7 0 0 0-14 0c0 5 7 12 7 12z"/><circle cx="12" cy="10" r="2.5"/></Ico>,
  plus:      (p={}) => <Ico {...p}><path d="M12 5v14M5 12h14"/></Ico>,
  grid:      (p={}) => <Ico {...p}><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></Ico>,
};

// Logo — hexagon + faceted pin
const _LogoSVG = ({ size, darkPin = false }) => (
  <svg width={size} height={size} viewBox="0 0 256 256" fill="none" aria-hidden="true">
    <defs>
      <linearGradient id="lhg" x1="0" y1="0" x2="1" y2="1">
        <stop offset="0%" stopColor="#4ADE80"/>
        <stop offset="100%" stopColor="#16A34A"/>
      </linearGradient>
      <linearGradient id="lpg" x1="0" y1="0" x2="1" y2="1">
        <stop offset="0%" stopColor="#22C55E"/>
        <stop offset="100%" stopColor="#15803D"/>
      </linearGradient>
      <linearGradient id="lpl" x1="0" y1="0" x2="0.3" y2="1">
        <stop offset="0%" stopColor="#86EFAC"/>
        <stop offset="100%" stopColor="#22C55E"/>
      </linearGradient>
    </defs>
    <path d="M128 20 L218 72 L218 184 L128 236 L38 184 L38 72 Z M128 46 L60 85 L60 171 L128 210 L196 171 L196 85 Z"
          fill="url(#lhg)" fillRule="evenodd"/>
    <path d="M128 70 L96 96 L96 126 L128 210 L160 126 L160 96 Z" fill="url(#lpg)"/>
    <path d="M128 70 L96 96 L96 126 L128 160 Z" fill="url(#lpl)" opacity="0.9"/>
    <path d="M128 100 L140 114 L128 128 L116 114 Z" fill={darkPin ? "#faf8f3" : "#0B1220"}/>
  </svg>
);

const LogoMark       = ({ size = 28 }) => <_LogoSVG size={size} darkPin={false}/>;
const LogoMarkFooter = ({ size = 30 }) => <_LogoSVG size={size} darkPin={true}/>;


Object.assign(window, { Icons, LogoMark, LogoMarkFooter });
