.family-map {
  --map-ink: #edeef6;
  --map-muted: #b5bdce;
  --map-path: #827a75;
  --map-background: #141924;
  --map-cli: #99e6d4;
  --map-desktop: #c9bbff;
  --map-core: #ffcf96;
  box-sizing: border-box;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(15px, 2.5vw, 26px) clamp(12px, 1.8vw, 20px) clamp(15px, 2.2vw, 23px);
  border-radius: 16px;
  color: var(--map-ink);
  background: var(--map-background);
  box-shadow: inset 0 0 0 1px rgb(174 193 229 / 16%), 0 15px 38px rgb(8 12 23 / 14%);
}

.family-map-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.family-map-devices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
  align-items: stretch;
  text-align: center;
}

.family-map a {
  display: inline-block;
  padding: 2px 0;
  font-size: clamp(.8rem, 1.5vw, 1rem);
  font-weight: 720;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
}

.family-map a:hover { text-decoration-color: currentColor; }

.family-map a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.family-map-cli a { color: var(--map-cli); }
.family-map-desktop a { color: var(--map-desktop); }

.family-map-stage {
  position: relative;
  isolation: isolate;
  margin: clamp(10px, 1.7vw, 20px) 0 7px;
  border-radius: 10px;
  overflow: hidden;
}

.family-map-chassis {
  display: block;
  width: 100%;
  height: auto;
}

/* The render and both screen planes share the same orthographic camera. */
.family-map a.family-map-screen {
  display: block;
  position: absolute;
  transform-origin: top left;
  overflow: hidden;
  padding: 0;
  background: #101620;
  cursor: zoom-in;
}

.family-map-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.family-map a.family-map-screen:focus-visible {
  outline: 3px solid white;
  outline-offset: 1px;
}
.family-map-role {
  display: block;
  max-width: 23ch;
  margin: 4px auto 0;
  color: var(--map-muted);
  font-size: clamp(.73rem, 1.2vw, .85rem);
  line-height: 1.42;
  text-wrap: balance;
}

.family-map-runtime {
  text-align: center;
}

.family-map-runtime img {
  display: block;
  width: clamp(42px, 7vw, 62px);
  height: auto;
  margin: 1px auto;
  border: 1px solid rgb(255 207 150 / 25%);
  border-radius: 13px;
  background: #23222d;
  box-shadow: 0 0 19px rgb(255 177 98 / 14%);
}

.family-map-runtime a {
  color: var(--map-core);
  font-size: clamp(1.1rem, 2.3vw, 1.5rem);
}

.family-map-runtime .family-map-role { max-width: 35ch; }

.family-map-integration {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 356px);
  margin: 17px auto 0;
  text-align: center;
}

.family-map-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  width: 100%;
}

.family-map-branches::before,
.family-map-branches::after {
  position: absolute;
  left: 25%;
  right: 25%;
  height: 8px;
  border: solid var(--map-path);
  content: "";
}

.family-map-branches::before {
  bottom: 100%;
  border-width: 1px 1px 0;
  border-radius: 4px 4px 0 0;
}

.family-map-branches::after {
  top: 100%;
  border-width: 0 1px 1px;
  border-radius: 0 0 4px 4px;
}

.family-map-branches span {
  padding: 3px 4px;
  color: var(--map-muted);
  font-size: clamp(.72rem, 1.2vw, .83rem);
  line-height: 1.35;
}

.family-map-integration strong {
  position: relative;
  font-size: .84rem;
}

.family-map-integration::before,
.family-map-integration strong::before {
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--map-path);
  content: "";
}

.family-map-integration::before {
  bottom: calc(100% + 9px);
  height: 8px;
}

.family-map-integration strong::before {
  bottom: 100%;
  height: 5px;
}

@media (max-width: 510px) {
  .family-map { padding-inline: 10px; }
  .family-map-stage { margin-inline: -4px; }
}
