.ecosystem-map-frame {
  --map-bg: #dededb;
  --map-paper: #f4f4f0;
  --map-paper-2: #fafaf7;
  --map-ink: #0e0f11;
  --map-muted: #6d6e74;
  --map-line: #d5d5cf;
  --map-lime: #d4ff17;
  --map-lav: #b9bcff;
  position: relative;
  left: calc(50% - clamp(20px, 3vw, 42px));
  width: min(95vw, 1440px);
  max-width: calc(100vw - 24px);
  margin: clamp(70px, 9vw, 120px) 0;
  transform: translateX(-50%);
  color: var(--map-ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
}

.ecosystem-map-frame,
.ecosystem-map-frame * { box-sizing: border-box; }
.ecosystem-map-frame button { font: inherit; }

.ecosystem-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--map-line);
  border-radius: 22px;
  background: var(--map-paper-2);
}
.ecosystem-map-toolbar-copy strong { display: block; font-size: 14px; }
.ecosystem-map-toolbar-copy span { display: block; margin-top: 3px; color: var(--map-muted); font-size: 11px; }
.ecosystem-map-switch { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid var(--map-line); border-radius: 999px; background: #e9e9e5; }
.ecosystem-map-switch button,
.ecosystem-map-tools button,
.ecosystem-map-quicknav button {
  border: 1px solid var(--map-line);
  border-radius: 999px;
  background: #ecece8;
  color: #242528;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.ecosystem-map-switch button { border: 0; padding: 8px 13px; font-size: 11px; font-weight: 800; }
.ecosystem-map-switch button.is-active { background: var(--map-ink); color: #fff; }
.ecosystem-map-card { overflow: hidden; border: 1px solid var(--map-line); border-radius: 28px; background: #efefec; box-shadow: 0 24px 80px rgba(0,0,0,.08); }
.ecosystem-map-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--map-line); background: rgba(250,250,247,.9); }
.ecosystem-map-top-left strong { display: block; font-size: 15px; }
.ecosystem-map-top-left > span { display: block; color: var(--map-muted); font-size: 11px; }
.ecosystem-map-breadcrumb { margin-top: 5px; color: #85868c; font-size: 10.5px; }
.ecosystem-map-breadcrumb b { color: #1b1c1f; }
.ecosystem-map-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.ecosystem-map-tools button { padding: 7px 10px; font-size: 11px; }
.ecosystem-map-tools button:hover, .ecosystem-map-quicknav button:hover { background: #fff; transform: translateY(-1px); }
.ecosystem-map-tools .ecosystem-map-global { border-color: var(--map-ink); background: var(--map-ink); color: #fff; }
.ecosystem-map-quicknav { display: flex; align-items: center; gap: 7px; overflow-x: auto; padding: 10px 14px; border-bottom: 1px solid var(--map-line); background: rgba(245,245,242,.94); scrollbar-width: none; }
.ecosystem-map-quicknav::-webkit-scrollbar { display: none; }
.ecosystem-map-quick-label { flex: 0 0 auto; margin-right: 2px; color: #8a8b91; font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.ecosystem-map-quicknav button { flex: 0 0 auto; padding: 7px 11px; font-size: 10.5px; font-weight: 750; }
.ecosystem-map-quicknav button.is-active { border-color: var(--map-ink); background: var(--map-ink); color: #fff; }
.ecosystem-map-quicknav button[data-map-focus="brain"].is-active { border-color: #aeb1e8; background: var(--map-lav); color: #111; }
.ecosystem-map-quicknav button[data-map-focus="harness"].is-active { border-color: #bfdc18; background: var(--map-lime); color: #111; }

.ecosystem-map-shell {
  position: relative;
  height: clamp(700px, calc(100svh - 160px), 820px);
  overflow: hidden;
  background: radial-gradient(circle at 16% 18%,rgba(185,188,255,.13),transparent 24%), radial-gradient(circle at 82% 80%,rgba(212,255,23,.10),transparent 26%), #efefec;
}
.ecosystem-map-dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle,rgba(0,0,0,.1) 1px,transparent 1px); background-size: 28px 28px; opacity: .34; }
.ecosystem-map-world { position: absolute; width: 2200px; height: 1250px; transform-origin: 0 0; transition: transform .95s cubic-bezier(.16,.84,.24,1); }
.ecosystem-edge-svg { position: absolute; inset: 0; width: 2200px; height: 1250px; pointer-events: none; }
.ecosystem-edge { fill: none; stroke: #bdbdb7; stroke-width: 2; stroke-linecap: round; transition: opacity .25s ease, stroke-width .25s ease; }
.ecosystem-edge-lime { stroke: #b5d915; stroke-width: 2.8; }
.ecosystem-edge-lav { stroke: #9ea2e1; stroke-width: 2.8; }
.ecosystem-edge-dash { stroke-dasharray: 7 9; }
.ecosystem-edge.is-lit { stroke-width: 3.5; }
.ecosystem-map-nodes { position: absolute; inset: 0; }

.ecosystem-node {
  position: absolute;
  z-index: 2;
  width: 215px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid #cecec8;
  border-radius: 26px;
  background: rgba(250,250,247,.98);
  box-shadow: 0 14px 36px rgba(0,0,0,.07);
  color: var(--map-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: opacity .3s ease, transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.ecosystem-node:hover, .ecosystem-node:focus-visible { transform: translateY(-5px) scale(1.015); box-shadow: 0 20px 48px rgba(0,0,0,.11); }
.ecosystem-node:focus-visible, .ecosystem-map-frame button:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.ecosystem-node.ecosystem-lime { border-color: #bfdc18; background: var(--map-lime); }
.ecosystem-node.ecosystem-lav { border-color: #aeb1e8; background: var(--map-lav); }
.ecosystem-node.ecosystem-center { z-index: 3; display: flex; width: 250px; min-height: 148px; flex-direction: column; justify-content: center; padding: 22px; border-color: var(--map-ink); border-radius: 34px; background: var(--map-ink); color: #fff; text-align: center; }
.ecosystem-node.ecosystem-input, .ecosystem-node.ecosystem-output { width: 190px; min-height: 96px; border-radius: 22px; }
.ecosystem-node.ecosystem-input { background: #f1f1ed; }
.ecosystem-node.ecosystem-output { border-color: #17181b; background: #17181b; color: #fff; }
.ecosystem-node.ecosystem-child { width: 180px; min-height: 92px; padding: 14px; border-radius: 21px; opacity: 0; pointer-events: none; transform: scale(.88); }
.ecosystem-node.ecosystem-child.is-visible { opacity: 1; pointer-events: auto; transform: scale(1); }
.ecosystem-node.ecosystem-expert-only { display: none; }
.ecosystem-map-frame.is-expert .ecosystem-node.ecosystem-expert-only { display: block; }
.ecosystem-node-k { display: block; margin-bottom: 8px; color: #777; font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.ecosystem-node.ecosystem-center .ecosystem-node-k { color: #a7a8ae; }
.ecosystem-node.ecosystem-lime .ecosystem-node-k, .ecosystem-node.ecosystem-lav .ecosystem-node-k { color: #4b4c50; }
.ecosystem-node strong { display: block; margin-bottom: 7px; font-size: 18px; letter-spacing: -.03em; line-height: 1; }
.ecosystem-node.ecosystem-center strong { font-size: 27px; }
.ecosystem-node.ecosystem-child strong { font-size: 15px; }
.ecosystem-node-p { display: block; color: #696a70; font-size: 11px; line-height: 1.4; }
.ecosystem-node.ecosystem-center .ecosystem-node-p, .ecosystem-node.ecosystem-output .ecosystem-node-p { color: #b8bac0; }
.ecosystem-node.ecosystem-child .ecosystem-node-p { font-size: 10.2px; }
.ecosystem-node-enter { display: block; margin-top: 12px; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }

.ecosystem-info { position: absolute; top: 15px; right: 15px; z-index: 5; width: 340px; max-height: calc(100% - 30px); overflow: auto; padding: 18px; border: 1px solid var(--map-line); border-radius: 24px; background: rgba(250,250,247,.98); box-shadow: 0 20px 58px rgba(0,0,0,.12); transform: translateX(calc(100% + 30px)); transition: transform .25s ease; }
.ecosystem-info.is-open { transform: translateX(0); }
.ecosystem-info-close { float: right; width: 30px; height: 30px; border: 1px solid var(--map-line); border-radius: 50%; background: #ecece8; cursor: pointer; line-height: 1; }
.ecosystem-info-k { color: #777; font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.ecosystem-info h3 { margin: 7px 0 10px; font-family: var(--display); font-size: 25px; letter-spacing: -.04em; line-height: 1; }
.ecosystem-info > p { color: var(--map-muted); font-size: 13px; line-height: 1.5; }
.ecosystem-info-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.ecosystem-info-chips span { padding: 6px 9px; border: 1px solid var(--map-line); border-radius: 999px; background: #e8e8e5; font-size: 11px; }
.ecosystem-info-section { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--map-line); }
.ecosystem-info-section b { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.ecosystem-info-section div { margin-top: 6px; color: #55565c; font-size: 12px; line-height: 1.5; }
.ecosystem-info-go { width: 100%; margin-top: 15px; padding: 12px 14px; border: 0; border-radius: 999px; background: var(--map-ink); color: #fff; cursor: pointer; font-size: 12px; font-weight: 850; }
.ecosystem-map-hint { position: absolute; right: auto; bottom: 14px; left: 14px; z-index: 4; padding: 8px 11px; border: 1px solid var(--map-line); border-radius: 999px; background: rgba(250,250,247,.92); color: #6e6f75; font-size: 11px; }

@media(max-width:900px){ .ecosystem-map-shell { height: 720px; min-height: 720px; } }
@media(max-width:600px){
  .ecosystem-map-frame { left: 50%; width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .ecosystem-map-toolbar, .ecosystem-map-top { align-items: flex-start; flex-direction: column; }
  .ecosystem-map-switch, .ecosystem-map-tools { width: 100%; }
  .ecosystem-map-switch button, .ecosystem-map-tools button { flex: 1; }
  .ecosystem-map-top { gap: 12px; padding: 13px 15px; }
  .ecosystem-map-shell { height: clamp(680px, calc(100svh - 120px), 760px); min-height: 680px; }
  .ecosystem-map-quicknav { padding: 9px 10px; }
  .ecosystem-info { right: 10px; left: 10px; width: auto; }
  .ecosystem-map-hint { right: 10px; bottom: 10px; left: 10px; text-align: center; }
}
@media(prefers-reduced-motion:reduce){ .ecosystem-map-frame *, .ecosystem-map-frame *::before, .ecosystem-map-frame *::after { scroll-behavior:auto!important; transition-duration:.01ms!important; } }
