#component-map {
  container-type: inline-size;
  min-width: 0;
  --ld-forest: #15332b;
  --ld-paper: #f7f6e9;
  --ld-accent: #d9f66f;
  --ld-type: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ld-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
#component-map .ld-map {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #b4bfab;
  border-radius: 18px;
  background: var(--ld-paper);
  color: var(--ld-forest);
  font-family: var(--ld-type);
  text-align: left;
}
#component-map .ld-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px clamp(14px, 3cqw, 32px);
  border-bottom: 1px solid #50665b;
  background: #18362e;
  color: #e5eddd;
  font: 500 12px/1.3 var(--ld-mono);
}
#component-map .ld-caption {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
#component-map .ld-caption::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid var(--ld-accent);
  transform: rotate(45deg);
}
#component-map .ld-motion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #597467;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#component-map .ld-motion::before {
  content: "";
  width: 7px;
  height: 8px;
  box-sizing: border-box;
  border-inline: 2px solid var(--ld-accent);
}
#component-map .ld-paused .ld-motion::before {
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-left: 7px solid var(--ld-accent);
  border-right: 0;
}
#component-map .ld-motion:hover { background: #274b3f; }
#component-map .ld-canvas {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(340px, 42cqw, 462px);
  overflow: hidden;
  background-color: #112e26;
  background-image: radial-gradient(circle at 1px 1px, #47645780 1px, transparent 1px),
    radial-gradient(ellipse at 48% 34%, #274c3c 0%, transparent 59%);
  background-size: 16px 16px, 100% 100%;
}
#component-map .ld-canvas.ld-narrow { height: clamp(448px, 97cqw, 550px); }
#component-map .ld-wires { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#component-map .ld-wires path { vector-effect: non-scaling-stroke; fill: none; }
#component-map .ld-line { stroke: #758e7b; stroke-width: 1.3px; }
#component-map .ld-record .ld-line { stroke-dasharray: 4 4; }
#component-map .ld-connected .ld-line { stroke: #aabf82; }
#component-map .ld-packet {
  display: none;
  stroke: var(--ld-accent);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 5 155;
  animation: ld-data-flow 4s linear infinite;
}
#component-map .ld-connected .ld-packet { display: block; }
#component-map .ld-paused .ld-packet { animation-play-state: paused; }
@keyframes ld-data-flow { to { stroke-dashoffset: -160; } }
#component-map .ld-column {
  position: absolute;
  color: #c0d0ba;
  font: 600 clamp(9px, 1cqw, 11px)/1.2 var(--ld-mono);
  letter-spacing: .11em;
  pointer-events: none;
}
#component-map .ld-node {
  position: absolute;
  display: grid;
  grid-template: "icon name" auto "icon sub" auto / auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  column-gap: clamp(7px, 1.2cqw, 15px);
  row-gap: 3px;
  box-sizing: border-box;
  margin: 0;
  padding: 2px clamp(8px, 1.4cqw, 19px);
  min-width: 0;
  border: 1px solid #789180;
  border-radius: 8px;
  background: #223f34;
  color: #f3f5df;
  font-family: var(--ld-type);
  text-align: left;
  cursor: pointer;
  transition: background-color .16s, border-color .16s;
}
#component-map .ld-node:hover { background: #355342; border-color: #ccd9ab; }
#component-map .ld-node[aria-pressed="true"] { background: var(--ld-accent); border-color: var(--ld-accent); color: #173326; }
#component-map .ld-node:focus-visible,
#component-map .ld-motion:focus-visible { outline: 3px solid #fff; outline-offset: 3px; z-index: 2; }
#component-map .ld-node svg { grid-area: icon; width: clamp(19px, 2.3cqw, 29px); height: auto; }
#component-map .ld-name {
  grid-area: name;
  font-size: clamp(12px, 1.75cqw, 19px);
  font-weight: 640;
  line-height: 1.15;
  letter-spacing: -.035em;
}
#component-map .ld-sub { grid-area: sub; color: #d0d9c6; font: 450 clamp(9px, 1.1cqw, 12px)/1.2 var(--ld-type); }
#component-map .ld-node[aria-pressed="true"] .ld-sub { color: #405732; }
#component-map .ld-details { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: clamp(22px, 5cqw, 64px); padding: 24px clamp(17px, 3.2cqw, 38px); border-top: 4px solid var(--ld-accent); }
#component-map .ld-title { font: 650 clamp(22px, 3cqw, 31px)/1.08 var(--ld-type); letter-spacing: -.045em; margin: 0 0 10px; color: var(--ld-forest); }
#component-map .ld-copy { margin: 0; max-width: 55ch; font: 400 14px/1.5 var(--ld-type); color: #3e5144; }
#component-map .ld-guidance { margin: 0; }
#component-map .ld-key { margin: 0 0 4px; font: 650 11px/1.3 var(--ld-mono); color: #495f49; }
#component-map .ld-key:not(:first-child) { margin-top: 12px; }
#component-map .ld-route { margin: 0; font: 500 13px/1.4 var(--ld-type); color: #263f2e; }
#component-map .ld-narrow .ld-node { grid-template: "icon name" auto "sub sub" auto / auto minmax(0, 1fr); padding-inline: clamp(6px, 2cqw, 12px); column-gap: 6px; row-gap: 5px; }
#component-map .ld-narrow .ld-name { font-size: clamp(12px, 3.3cqw, 17px); }
#component-map .ld-narrow .ld-sub { font-size: clamp(9px, 2.55cqw, 12px); }
#component-map .ld-narrow .ld-node svg { width: clamp(15px, 4cqw, 21px); }
@container (max-width: 600px) {
  #component-map .ld-details { grid-template-columns: 1fr; gap: 15px; padding-block: 17px; }
  #component-map .ld-guidance { border-top: 1px solid #cad4bf; padding-top: 12px; }
}
@container (max-width: 340px) {
  #component-map .ld-narrow .ld-node { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; text-align: center; }
  #component-map .ld-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #component-map .ld-node { transition: none; }
}
@media print {
  #component-map .ld-packet, #component-map .ld-motion { display: none; }
  #component-map .ld-map { break-inside: avoid; print-color-adjust: exact; }
}
