.robot-section {
  container-type: inline-size;
  --section-bg: #111a24;
  --section-text: #e5edf4;
  --section-muted: #b0bfcd;
  --section-line: #415263;
  --section-accent: #ff944f;
  color: var(--section-text);
  background: var(--section-bg);
  margin: 2rem 0 2.5rem;
  border: 1px solid var(--section-line);
}

.robot-section [hidden] { display: none; }
.robot-section-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--section-line);
}
.robot-section button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
}
.robot-section button:enabled { cursor: pointer; }
.robot-section button:focus-visible,
.robot-section-viewport:focus-visible { outline: 2px solid var(--section-accent); outline-offset: -3px; }
.robot-section-tabs button {
  flex: 1 1 auto;
  padding: .65rem .8rem;
  min-height: 44px;
  border-bottom: 3px solid transparent;
  font-weight: 600;
}
.robot-section-tabs button[aria-selected="true"] {
  border-bottom-color: var(--section-accent);
  background: #1b2937;
}
.robot-section-tabs button:enabled:hover { color: var(--section-accent); }
.robot-section-viewport { overflow-x: auto; }
.robot-section-drawing { position: relative; min-width: 650px; aspect-ratio: 960 / 520; }
.robot-section-drawing > *,
.robot-section-drawing img,
.robot-section-drawing canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.project-body .robot-section-drawing img { margin: 0; border: 0; }
.robot-section-legend {
  position: absolute;
  inset: 4% auto auto 2%;
  display: grid;
  justify-items: start;
}
.robot-section-legend button {
  display: flex;
  align-items: center;
  gap: .6em;
  font-size: .84rem;
  padding: .4em .5em;
  text-align: left;
}
.robot-section-legend button::before {
  content: "";
  width: .7em;
  height: .7em;
  background: var(--swatch);
}
.robot-section-legend button[data-highlighted] {
  color: var(--section-accent);
}
.robot-section-legend button[data-highlighted]::before { background: var(--section-accent); }
.robot-section canvas[data-part-target] { cursor: pointer; }
.robot-section figcaption {
  min-height: 4rem;
  padding: .7rem 1rem;
  border-top: 1px solid var(--section-line);
  color: var(--section-muted);
  font-size: .875rem;
  line-height: 1.5;
}
.robot-section svg { font-family: inherit; }
.robot-section svg text { fill: var(--section-text); font-size: 19px; }
.robot-section svg .small { fill: var(--section-muted); font-size: 17px; }
.robot-section svg .ground { stroke: #506174; stroke-width: 1; fill: none; }
.robot-section svg .frame { fill: #182431; stroke: #536779; stroke-width: 1.5; }
.robot-section svg .joint-axis { fill: none; stroke: #8da1b3; stroke-width: 1.25; stroke-dasharray: 6 4; }
.robot-section svg .link { fill: none; stroke: #b6d7e6; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.robot-section svg .motion { fill: none; stroke: var(--section-accent); stroke-width: 2.6; }
.robot-section svg .joint { fill: var(--section-bg); stroke: var(--section-accent); stroke-width: 2.6; }
.robot-section svg .block { fill: #1b2a39; stroke: #667e94; stroke-width: 1.4; }
.robot-section svg .signal,
.robot-section svg .supply,
.robot-section svg .wire { fill: none; stroke-width: 2; stroke-linejoin: round; }
.robot-section svg .signal { stroke: #82d1bf; }
.robot-section svg .supply { stroke: #f2cb72; }
.robot-section svg .wire { stroke: #d891a9; }
.robot-section svg .motor { fill: #d891a9; stroke: #f2bccf; stroke-width: 1.4; }
.robot-section svg .projected { fill: #553745; stroke-dasharray: 5 3; }
.robot-section svg .motor-text { fill: #201824; font-size: 17px; font-weight: 700; }
.robot-section svg .motor-text.projected-label { fill: #ffe8ef; }
.robot-section svg .transmission { stroke: #b3c5d1; stroke-width: 1.3; stroke-dasharray: 3 4; fill: none; }
.robot-section-scroll-hint { display: none; }
@container (width < 650px) {
  .robot-section-scroll-hint {
    display: block;
    color: var(--section-muted);
    font-size: .8rem;
    padding: .55rem 1rem;
    border-bottom: 1px solid var(--section-line);
  }
}
