.ddla-cosmography {
  --ddla-cosmo-gold: var(--ddla-gold, #d9bb76);
  --ddla-cosmo-blue: var(--ddla-blue-light, #78d7ff);
  --ddla-cosmo-text: var(--ddla-text-main, #edf6fb);
  --ddla-cosmo-primary-size: 88px;
  --ddla-cosmo-child-size: 44px;
  --ddla-cosmo-primary-radius: 304;
  --ddla-cosmo-child-radius: 104;
  --ddla-cosmo-sphere-radius: 164;
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 320px;
  overflow: visible;
  color: var(--ddla-cosmo-text);
  background: transparent !important;
  isolation: isolate;
  contain: layout style;
}

.ddla-cosmography *,
.ddla-cosmography *::before,
.ddla-cosmography *::after {
  box-sizing: border-box;
}

.ddla-cosmography__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 320px;
  overflow: visible;
  background: transparent;
}

.ddla-cosmography__system {
  --ddla-cosmo-size: 860px;
  position: relative;
  display: block;
  width: min(100%, var(--ddla-cosmo-size));
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: visible;
  margin-inline: auto;
  transform: translateZ(0);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

@supports not (aspect-ratio: 1 / 1) {
  .ddla-cosmography__system {
    height: min(100vw, var(--ddla-cosmo-size));
  }
}

.ddla-cosmography__sphere,
.ddla-cosmography__geometry {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ddla-cosmography__sphere {
  z-index: 1;
  display: block;
  background: transparent;
  pointer-events: none;
}

.ddla-cosmography__geometry {
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

/* The layers deliberately generate no box. This prevents a transparent,
   full-size layer from swallowing taps in Safari/iOS while keeping every
   node positioned against the main system. */
.ddla-cosmography__primary-layer,
.ddla-cosmography__secondary-layer {
  display: contents;
}

.ddla-cosmography__grid circle,
.ddla-cosmography__grid path,
.ddla-cosmography__main-connectors path,
.ddla-cosmography__micro-orbits circle,
.ddla-cosmography__micro-rays path,
.ddla-cosmography__ambient-orbits circle {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.ddla-cosmography__grid circle,
.ddla-cosmography__grid path {
  stroke: rgba(120, 215, 255, .10);
  stroke: color-mix(in srgb, var(--ddla-cosmo-blue) 15%, transparent);
  stroke-width: 1;
}

.ddla-cosmography__grid circle:nth-child(odd) {
  stroke-dasharray: 2 14;
}

.ddla-cosmography__ambient-orbits circle {
  stroke: rgba(217, 187, 118, .26);
  stroke: color-mix(in srgb, var(--ddla-cosmo-gold) 38%, transparent);
  stroke-width: 1.1;
  stroke-dasharray: 2 15;
  transform-origin: 500px 500px;
  animation: ddla-cosmo-orbit-spin 130s linear infinite;
}

.ddla-cosmography__ambient-orbits circle:last-child {
  stroke: rgba(120, 215, 255, .24);
  stroke: color-mix(in srgb, var(--ddla-cosmo-blue) 36%, transparent);
  animation-direction: reverse;
  animation-duration: 180s;
}

@keyframes ddla-cosmo-orbit-spin {
  to { transform: rotate(360deg); }
}

.ddla-cosmography__main-connectors path {
  stroke: rgba(217, 187, 118, .20);
  stroke: color-mix(in srgb, var(--ddla-cosmo-gold) 24%, transparent);
  stroke-width: 1;
}

.ddla-cosmography__main-connectors circle {
  fill: rgba(217, 187, 118, .72);
  fill: color-mix(in srgb, var(--ddla-cosmo-gold) 72%, transparent);
}

.ddla-cosmography__micro-orbits circle {
  stroke: rgba(120, 215, 255, .36);
  stroke: color-mix(in srgb, var(--ddla-cosmo-blue) 46%, transparent);
  stroke-width: 1.25;
  stroke-dasharray: 3 11;
  opacity: 0;
  transition: opacity 260ms ease;
}

.ddla-cosmography__micro-orbits circle.is-visible {
  opacity: 1;
  animation: ddla-cosmo-local-spin 50s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes ddla-cosmo-local-spin {
  to { transform: rotate(360deg); }
}

.ddla-cosmography__micro-rays path {
  stroke: rgba(120, 215, 255, .18);
  stroke: color-mix(in srgb, var(--ddla-cosmo-blue) 24%, transparent);
  stroke-width: .85;
  opacity: 0;
  transition: opacity 260ms ease, stroke 260ms ease;
}

.ddla-cosmography__micro-rays path.is-visible { opacity: 1; }

.ddla-cosmography__micro-rays path.is-active {
  stroke: rgba(217, 187, 118, .42);
  stroke: color-mix(in srgb, var(--ddla-cosmo-gold) 48%, transparent);
}

.ddla-cosmography__primary,
.ddla-cosmography__secondary {
  position: absolute;
  left: var(--ddla-cosmo-x, 50%);
  top: var(--ddla-cosmo-y, 50%);
  z-index: 8;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ddla-cosmography__primary {
  width: var(--ddla-cosmo-primary-size);
  height: var(--ddla-cosmo-primary-size);
  opacity: .95;
  transition: transform 260ms ease, opacity 260ms ease, filter 260ms ease;
}

.ddla-cosmography__secondary {
  z-index: 10;
  width: var(--ddla-cosmo-child-size);
  height: var(--ddla-cosmo-child-size);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(.64);
  transition: opacity 240ms ease, visibility 240ms ease, transform 320ms cubic-bezier(.2, .8, .2, 1);
}

.ddla-cosmography__primary::before,
.ddla-cosmography__primary::after,
.ddla-cosmography__secondary::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ddla-cosmography__primary::before {
  inset: 0;
  border: 1px solid rgba(217, 187, 118, .48);
  border-color: color-mix(in srgb, var(--ddla-cosmo-gold) 48%, transparent);
  box-shadow: inset 0 0 22px rgba(217, 187, 118, .08), 0 0 30px rgba(120, 215, 255, .08);
}

.ddla-cosmography__primary::after {
  inset: 7px;
  border: 1px dashed rgba(120, 215, 255, .24);
  border-color: color-mix(in srgb, var(--ddla-cosmo-blue) 24%, transparent);
  animation: ddla-cosmo-node-spin 24s linear infinite;
}

@keyframes ddla-cosmo-node-spin {
  to { transform: rotate(360deg); }
}

.ddla-cosmography__primary-ring,
.ddla-cosmography__secondary-ring {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, rgba(28, 64, 86, .78), rgba(4, 13, 24, .94) 72%);
  border: 1px solid rgba(120, 215, 255, .24);
  border-color: color-mix(in srgb, var(--ddla-cosmo-blue) 24%, transparent);
  transition: border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.ddla-cosmography__primary-ring { inset: 14%; }
.ddla-cosmography__secondary-ring { inset: 12%; }

.ddla-cosmography__primary-icon,
.ddla-cosmography__secondary-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--ddla-cosmo-gold);
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.ddla-cosmography__primary-icon { font-size: calc(var(--ddla-cosmo-primary-size) * .27); }
.ddla-cosmography__secondary-icon { font-size: calc(var(--ddla-cosmo-child-size) * .38); }

.ddla-cosmography__primary-icon svg,
.ddla-cosmography__secondary-icon svg {
  position: static !important;
  display: block !important;
  width: 1em !important;
  height: 1em !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  flex: none !important;
}

.ddla-cosmography__primary-icon i,
.ddla-cosmography__secondary-icon i {
  position: static !important;
  display: grid !important;
  place-items: center !important;
  width: 1em !important;
  height: 1em !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: 1 !important;
  transform: none !important;
}

.ddla-cosmography__primary-icon i::before,
.ddla-cosmography__secondary-icon i::before {
  display: block;
  margin: 0;
  line-height: 1;
}

.ddla-cosmography__primary:hover,
.ddla-cosmography__primary:focus-visible,
.ddla-cosmography__primary.is-active {
  transform: translate(-50%, -50%) scale(1.055);
}

.ddla-cosmography__primary:hover .ddla-cosmography__primary-ring,
.ddla-cosmography__primary:focus-visible .ddla-cosmography__primary-ring,
.ddla-cosmography__primary.is-active .ddla-cosmography__primary-ring {
  border-color: rgba(217, 187, 118, .72);
  border-color: color-mix(in srgb, var(--ddla-cosmo-gold) 68%, transparent);
  box-shadow: 0 0 0 1px rgba(217, 187, 118, .12), 0 0 30px rgba(217, 187, 118, .18), inset 0 0 22px rgba(120, 215, 255, .14);
}

.ddla-cosmography__primary.is-dimmed {
  opacity: .34;
  filter: saturate(.72);
}

.ddla-cosmography__secondary::before {
  inset: 0;
  border: 1px solid rgba(120, 215, 255, .28);
  border-color: color-mix(in srgb, var(--ddla-cosmo-blue) 28%, transparent);
  box-shadow: 0 0 20px rgba(120, 215, 255, .08);
}

.ddla-cosmography__secondary.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.ddla-cosmography__secondary:hover .ddla-cosmography__secondary-ring,
.ddla-cosmography__secondary:focus-visible .ddla-cosmography__secondary-ring,
.ddla-cosmography__secondary.is-active .ddla-cosmography__secondary-ring {
  border-color: rgba(217, 187, 118, .72);
  border-color: color-mix(in srgb, var(--ddla-cosmo-gold) 70%, transparent);
  box-shadow: 0 0 0 1px rgba(217, 187, 118, .10), 0 0 22px rgba(217, 187, 118, .18);
}

.ddla-cosmography__chamfer {
  --ddla-cosmo-cut: 7px;
  position: absolute;
  display: block;
  padding: 1px;
  clip-path: polygon(var(--ddla-cosmo-cut) 0, calc(100% - var(--ddla-cosmo-cut)) 0, 100% var(--ddla-cosmo-cut), 100% calc(100% - var(--ddla-cosmo-cut)), calc(100% - var(--ddla-cosmo-cut)) 100%, var(--ddla-cosmo-cut) 100%, 0 calc(100% - var(--ddla-cosmo-cut)), 0 var(--ddla-cosmo-cut));
  background: linear-gradient(135deg, var(--ddla-cosmo-gold), rgba(120, 215, 255, .35) 45%, var(--ddla-cosmo-gold));
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, .34));
  pointer-events: none;
}

.ddla-cosmography__chamfer > span {
  display: block;
  clip-path: inherit;
  background: rgba(4, 13, 24, .92);
  color: var(--ddla-cosmo-text);
}

.ddla-cosmography__primary-label {
  min-width: max-content;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ddla-cosmography__primary-label > span { padding: 7px 11px; }

.ddla-cosmography__secondary-label {
  --ddla-cosmo-cut: 5px;
  min-width: max-content;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .04em;
}

.ddla-cosmography__secondary-label > span { padding: 5px 8px; }

.ddla-cosmography__primary[data-label-position="top"] .ddla-cosmography__primary-label,
.ddla-cosmography__secondary[data-label-position="top"] .ddla-cosmography__secondary-label {
  left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
}
.ddla-cosmography__primary[data-label-position="bottom"] .ddla-cosmography__primary-label,
.ddla-cosmography__secondary[data-label-position="bottom"] .ddla-cosmography__secondary-label {
  left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
}
.ddla-cosmography__primary[data-label-position="left"] .ddla-cosmography__primary-label,
.ddla-cosmography__secondary[data-label-position="left"] .ddla-cosmography__secondary-label {
  right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
}
.ddla-cosmography__primary[data-label-position="right"] .ddla-cosmography__primary-label,
.ddla-cosmography__secondary[data-label-position="right"] .ddla-cosmography__secondary-label {
  left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
}

.ddla-cosmography__reset {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .ddla-cosmography,
  .ddla-cosmography__stage,
  .ddla-cosmography__system {
    overflow: visible;
  }

  .ddla-cosmography__system {
    width: min(100%, var(--ddla-cosmo-size));
    min-height: 0;
  }

  .ddla-cosmography__primary {
    width: min(var(--ddla-cosmo-primary-size), 78px);
    height: min(var(--ddla-cosmo-primary-size), 78px);
  }

  .ddla-cosmography__secondary {
    width: min(var(--ddla-cosmo-child-size), 40px);
    height: min(var(--ddla-cosmo-child-size), 40px);
  }

  .ddla-cosmography__primary.is-active .ddla-cosmography__primary-label {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 767px) {
  .ddla-cosmography {
    min-height: 300px;
    overflow: visible;
  }

  .ddla-cosmography__stage {
    min-height: 300px;
    overflow: visible;
  }

  .ddla-cosmography__system {
    width: 100%;
    min-height: 0;
    overflow: visible;
  }

  .ddla-cosmography__primary {
    width: min(var(--ddla-cosmo-primary-size), 62px);
    height: min(var(--ddla-cosmo-primary-size), 62px);
  }

  .ddla-cosmography__secondary {
    width: min(var(--ddla-cosmo-child-size), 32px);
    height: min(var(--ddla-cosmo-child-size), 32px);
  }

  .ddla-cosmography__primary::after,
  .ddla-cosmography__ambient-orbits circle,
  .ddla-cosmography__micro-orbits circle.is-visible {
    animation: none !important;
  }

  .ddla-cosmography__primary-label {
    --ddla-cosmo-cut: 4px;
    font-size: 8px;
    letter-spacing: .07em;
    filter: none;
  }

  .ddla-cosmography__primary-label > span { padding: 5px 6px; }

  .ddla-cosmography__secondary-label { display: none; }

  .ddla-cosmo-mobile-labels-yes .ddla-cosmography__secondary-label {
    display: block;
    font-size: 8px;
  }

  .ddla-cosmo-mobile-labels-yes .ddla-cosmography__secondary-label > span { padding: 4px 6px; }

  .ddla-cosmography__grid circle:first-child,
  .ddla-cosmography__grid circle:nth-child(2),
  .ddla-cosmography__grid path { opacity: .32; }

  /* Keep all main captions underneath their nodes on narrow screens. */
  .ddla-cosmography__primary .ddla-cosmography__primary-label {
    left: 50% !important;
    right: auto !important;
    top: calc(100% + 7px) !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ddla-cosmography__ambient-orbits circle,
  .ddla-cosmography__micro-orbits circle.is-visible,
  .ddla-cosmography__primary::after {
    animation: none !important;
  }

  .ddla-cosmography__primary,
  .ddla-cosmography__secondary,
  .ddla-cosmography__micro-orbits circle,
  .ddla-cosmography__micro-rays path {
    transition-duration: 0ms !important;
  }
}

/* ==========================================================================\
   0.3.4 · Mobile performance pass
   ========================================================================== */
.ddla-cosmography {
  contain: layout paint style;
}

@media (max-width: 767px) {
  .ddla-cosmography {
    content-visibility: auto;
    contain-intrinsic-size: 520px;
  }

  .ddla-cosmography__primary::after {
    animation: none !important;
  }

  .ddla-cosmography__primary,
  .ddla-cosmography__secondary,
  .ddla-cosmography__primary-ring,
  .ddla-cosmography__secondary-ring {
    transition-duration: 160ms !important;
  }

  .ddla-cosmography__primary::before,
  .ddla-cosmography__secondary::before,
  .ddla-cosmography__primary-ring,
  .ddla-cosmography__secondary-ring {
    box-shadow: none !important;
  }

  .ddla-cosmography__chamfer {
    filter: none !important;
  }
}
