/* KINGQUOC Godtrix Systems Map — UI v1.0 */

.synthetic-atlas {
  --synthetic-page: min(1720px, calc(100vw - 64px));
  --synth-crimson: #ff5c79;
  --synth-crimson-deep: #7c203d;
  --synth-violet: #b091ff;
  --synth-cyan: #76d9ff;
  --synth-rose: #ff8caa;
  --synth-earth: #65bfff;
  --synth-human: #eef6ff;
  --synth-gray: #9fb0c4;
  --synth-surface: rgba(8, 15, 26, .94);
  background:
    radial-gradient(circle at 78% 13%, rgba(119, 42, 128, .13), transparent 34rem),
    radial-gradient(circle at 18% 28%, rgba(24, 89, 127, .12), transparent 38rem),
    linear-gradient(180deg, #050811, #080711 42%, #040810 100%);
}

.synthetic-star-field .nebula-a {
  background: #0b6f9f;
}

.synthetic-star-field .nebula-b {
  background: #951d4b;
  opacity: .2;
}

.synthetic-grid {
  opacity: .14;
  background-image:
    linear-gradient(rgba(123, 174, 210, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 174, 210, .12) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 50% 42%, black, transparent 73%);
}

.synthetic-header {
  border-bottom-color: rgba(242, 94, 125, .18);
  background: rgba(5, 8, 16, .88);
}

.synthetic-header .primary-nav a[aria-current="page"] {
  color: #f9dce5;
}

.synthetic-header .primary-nav a[aria-current="page"]::after {
  width: 100%;
}

.synthetic-hero {
  position: relative;
  width: var(--synthetic-page);
  min-height: 820px;
  margin: 0 auto;
  padding: 116px 0 74px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(410px, .68fr);
  align-items: center;
  gap: clamp(56px, 7vw, 130px);
}

.synthetic-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4%;
  left: 4%;
  width: 72%;
  aspect-ratio: 1.35;
  border: 1px solid rgba(242, 94, 125, .08);
  border-radius: 50%;
  background:
    radial-gradient(circle at 44% 44%, rgba(255, 82, 119, .1), transparent 8%),
    radial-gradient(circle at 44% 44%, transparent 0 22%, rgba(173, 138, 255, .05) 22.2% 22.5%, transparent 22.7%),
    radial-gradient(circle at 44% 44%, transparent 0 37%, rgba(114, 217, 255, .04) 37.2% 37.45%, transparent 37.7%);
  filter: drop-shadow(0 0 80px rgba(166, 56, 103, .08));
  transform: rotate(-13deg);
}

.synthetic-hero-copy {
  position: relative;
  z-index: 2;
}

.synthetic-hero .kicker {
  color: #ed8ca3;
}

.synthetic-hero h1 {
  max-width: 980px;
  margin: 24px 0 0;
  font-family: var(--serif);
  font-size: clamp(70px, 7.1vw, 126px);
  font-weight: 400;
  letter-spacing: -.052em;
  line-height: .84;
}

.synthetic-hero h1 span {
  color: #f1b7c8;
  text-shadow: 0 0 52px rgba(239, 82, 120, .13);
}

.synthetic-hero-deck {
  max-width: 790px;
  margin: 34px 0 0;
  color: #c2ceda;
  font-size: clamp(19px, 1.25vw, 22px);
  line-height: 1.68;
}

.synthetic-actions {
  justify-content: flex-start;
}

.synthetic-actions .button-primary,
.atlas-return .button-primary {
  border-color: #f1a1b4;
  background: #f1a1b4;
  color: #150b12;
}

.synthetic-actions .button-primary:hover,
.atlas-return .button-primary:hover {
  background: #ffd3de;
}

.synthetic-hero-geometry {
  position: absolute;
  z-index: 0;
  inset: 36px 36% auto auto;
  width: min(38vw, 650px);
  aspect-ratio: 1;
  opacity: .5;
  pointer-events: none;
}

.synthetic-hero-geometry i {
  position: absolute;
  inset: calc(var(--ring, 0) * 8%);
  border: 1px solid rgba(168, 129, 255, calc(.22 - var(--ring, 0) * .025));
  border-radius: 50%;
  transform: rotate(calc(var(--ring, 0) * 17deg));
}

.synthetic-hero-geometry i:nth-child(1) { --ring: 0; }
.synthetic-hero-geometry i:nth-child(2) { --ring: 1; }
.synthetic-hero-geometry i:nth-child(3) { --ring: 2; }
.synthetic-hero-geometry i:nth-child(4) { --ring: 3; }
.synthetic-hero-geometry i:nth-child(5) {
  --ring: 4;
  border-color: rgba(255, 94, 124, .32);
  box-shadow: 0 0 70px rgba(255, 80, 118, .12);
}

.containment-stack {
  position: relative;
  z-index: 2;
  padding: 18px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(160, 192, 218, .18);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(129, 56, 109, .08), transparent 36%),
    rgba(7, 14, 24, .82);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
  backdrop-filter: blur(20px);
}

.containment-item {
  min-height: 110px;
  padding: 18px 20px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(157, 193, 221, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
}

.containment-item.is-outside {
  border-color: rgba(218, 230, 243, .24);
}

.containment-item.is-container {
  border-color: rgba(119, 213, 255, .24);
  background: linear-gradient(90deg, rgba(51, 153, 208, .08), transparent);
}

.containment-item.is-system {
  border-color: rgba(242, 92, 121, .3);
  background: linear-gradient(90deg, rgba(242, 62, 104, .1), transparent);
}

.containment-item.is-earth {
  border-color: rgba(101, 191, 255, .3);
  background: linear-gradient(90deg, rgba(64, 153, 221, .09), transparent);
}

.containment-index {
  margin-bottom: 7px;
  color: #8594a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
}

.containment-item strong {
  font-family: var(--serif);
  font-size: clamp(21px, 1.4vw, 27px);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.15;
}

.containment-item small {
  margin-top: 8px;
  color: #99a8ba;
  font-size: 13px;
  line-height: 1.45;
}

.containment-arrow {
  height: 18px;
  display: grid;
  place-items: center;
  color: #77576e;
  font-size: 14px;
}

.synthetic-stats {
  grid-column: 1 / -1;
  margin: 24px 0 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border: 1px solid rgba(157, 193, 221, .15);
  border-radius: 18px;
  background: rgba(7, 14, 24, .58);
}

.synthetic-stats div {
  min-height: 78px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
}

.synthetic-stats dt {
  color: #f2b1c1;
  font-family: var(--serif);
  font-size: 33px;
  line-height: 1;
}

.synthetic-stats dd {
  margin: 0;
  color: #94a3b6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.4;
  text-transform: uppercase;
}

.synthetic-fiction-notice {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.synthetic-coordinate-bar {
  border-color: rgba(242, 92, 121, .18);
}

.synthetic-coordinate-bar a {
  color: inherit;
  text-decoration: none;
}

.synthetic-coordinate-bar a:hover {
  color: #ffd2dc;
}

.systems-section {
  width: var(--synthetic-page);
  margin: 0 auto;
  padding: 110px 0 120px;
}

.systems-heading h2 {
  font-size: clamp(55px, 5.2vw, 88px);
}

.systems-heading > p {
  max-width: 690px;
}

.scope-guardrail {
  margin-top: 42px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(190, 211, 230, .2);
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(227, 237, 247, .035), transparent 35%),
    rgba(7, 14, 24, .7);
}

.scope-symbol {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 240, 249, .3);
  border-radius: 50%;
  color: #edf5ff;
  font-family: var(--serif);
  font-size: 21px;
}

.scope-guardrail b {
  color: #e2ebf4;
  font-size: 11px;
  letter-spacing: .15em;
}

.scope-guardrail p {
  margin: 4px 0 0;
  color: #aebdcd;
  font-size: 15px;
  line-height: 1.55;
}

.scope-guardrail a {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(177, 206, 229, .2);
  border-radius: 9px;
  color: #c9d8e6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.scope-guardrail a:hover {
  border-color: rgba(237, 245, 252, .5);
  color: white;
}

.lens-bar {
  min-height: 104px;
  margin-top: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  border: 1px solid rgba(157, 193, 221, .18);
  border-radius: 16px;
  background: rgba(7, 14, 24, .78);
}

.lens-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.control-label {
  flex: 0 0 auto;
  color: #8292a6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.lens-buttons,
.trace-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lens-button,
.system-control {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(157, 193, 221, .16);
  border-radius: 9px;
  background: rgba(13, 23, 37, .72);
  color: #9cabbd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.lens-button:hover,
.lens-button:focus-visible,
.system-control:hover,
.system-control:focus-visible {
  border-color: rgba(245, 182, 199, .5);
  color: #f7e5ea;
  transform: translateY(-1px);
}

.lens-button.is-active,
.system-control.is-active {
  border-color: rgba(247, 130, 158, .72);
  background: rgba(197, 48, 85, .18);
  color: #ffe2e9;
}

.system-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 12px 0;
  border-top: 1px solid rgba(157, 193, 221, .1);
  color: #8595a9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.5;
  text-transform: uppercase;
}

.system-workspace {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(800px, 1.62fr) minmax(420px, .72fr);
  align-items: start;
  gap: 18px;
}

.systems-viewport {
  position: relative;
  min-height: 1390px;
  overflow: auto;
  border: 1px solid rgba(157, 193, 221, .2);
  border-radius: 22px;
  background: rgba(4, 9, 17, .9);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .26);
  scrollbar-color: rgba(227, 102, 135, .55) rgba(4, 9, 17, .5);
}

.map-zoom-controls {
  position: sticky;
  z-index: 30;
  top: 12px;
  width: max-content;
  margin: 12px 12px -52px auto;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(157, 193, 221, .2);
  border-radius: 10px;
  background: rgba(7, 14, 24, .94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
}

.map-zoom-controls button,
.map-zoom-controls span {
  min-width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #b4c2d2;
  font-size: 13px;
}

.map-zoom-controls button {
  cursor: pointer;
}

.map-zoom-controls button:hover,
.map-zoom-controls button:focus-visible {
  background: rgba(240, 92, 123, .13);
  color: white;
}

.map-zoom-controls button:last-child {
  min-width: 48px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.map-zoom-controls span {
  min-width: 50px;
  color: #8292a7;
  font-size: 11px;
  font-weight: 800;
}

.systems-stage {
  --map-scale: 1;
  position: relative;
  width: 100%;
  min-width: 940px;
  height: 1360px;
  overflow: hidden;
  transform: scale(var(--map-scale));
  transform-origin: top left;
  background:
    radial-gradient(circle at 50% 15%, rgba(241, 76, 116, .12), transparent 17%),
    radial-gradient(circle at 50% 61%, rgba(143, 101, 230, .07), transparent 25%),
    radial-gradient(circle at 50% 91%, rgba(60, 154, 220, .1), transparent 20%),
    linear-gradient(90deg, transparent 49.92%, rgba(222, 113, 143, .09) 50%, transparent 50.08%),
    rgba(4, 9, 17, .92);
  transition: transform .28s var(--ease);
}

.systems-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(147, 187, 219, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 187, 219, .13) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, transparent, black 8%, black 94%, transparent);
  pointer-events: none;
}

.systems-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 110px 7% 70px;
  border: 1px solid rgba(238, 91, 124, .13);
  border-radius: 46% 46% 18% 18% / 15% 15% 8% 8%;
  box-shadow:
    inset 0 0 120px rgba(196, 40, 81, .035),
    0 0 80px rgba(196, 40, 81, .025);
  pointer-events: none;
}

.stage-coordinate {
  position: absolute;
  z-index: 4;
  left: 26px;
  color: #75859a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.stage-coordinate-top {
  top: 22px;
}

.stage-coordinate-bottom {
  bottom: 20px;
}

.system-band {
  position: absolute;
  z-index: 0;
  left: 70px;
  right: 20px;
  border-top: 1px solid rgba(157, 193, 221, .12);
  border-bottom: 1px solid rgba(157, 193, 221, .08);
  pointer-events: none;
}

.system-band span {
  position: absolute;
  top: 10px;
  left: 12px;
  color: rgba(153, 172, 195, .65);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.band-container {
  top: 40px;
  height: 85px;
  border-color: rgba(221, 234, 245, .2);
  background: linear-gradient(90deg, rgba(226, 237, 247, .025), transparent);
}

.band-command {
  top: 125px;
  height: 365px;
  border-color: rgba(242, 92, 121, .16);
  background: linear-gradient(90deg, transparent, rgba(207, 48, 88, .035), transparent);
}

.band-administration {
  top: 490px;
  height: 330px;
  border-color: rgba(175, 135, 244, .15);
  background:
    linear-gradient(90deg, rgba(255, 194, 114, .025), transparent 35%),
    linear-gradient(270deg, rgba(85, 183, 232, .025), transparent 35%);
}

.band-engineered {
  top: 820px;
  height: 235px;
  border-color: rgba(143, 160, 182, .16);
  background: linear-gradient(90deg, transparent, rgba(132, 151, 177, .03), transparent);
}

.band-planetary {
  top: 1055px;
  height: 155px;
  border-color: rgba(79, 169, 229, .18);
  background: linear-gradient(90deg, transparent, rgba(57, 153, 220, .05), transparent);
}

.band-human {
  top: 1210px;
  height: 130px;
  border-color: rgba(217, 232, 246, .17);
  background: linear-gradient(90deg, transparent, rgba(216, 235, 248, .035), transparent);
}

.sector-label {
  position: absolute;
  z-index: 3;
  top: 505px;
  color: rgba(145, 161, 183, .6);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.sector-belief {
  left: 78px;
  color: rgba(242, 188, 129, .62);
}

.sector-command {
  left: calc(50% - 13px);
  color: rgba(247, 121, 153, .56);
}

.sector-council {
  right: 28px;
  color: rgba(111, 202, 242, .57);
}

.system-connections,
.system-nodes {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.system-connections {
  z-index: 1;
  overflow: visible;
}

.system-relation {
  fill: none;
  stroke: rgba(181, 194, 209, .26);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
  transition: opacity .25s, stroke .25s, stroke-width .25s, filter .25s;
}

.system-relation[data-family="command"] {
  stroke: rgba(245, 83, 123, .5);
}

.system-relation[data-family="influence"] {
  stroke: rgba(242, 184, 116, .48);
  stroke-dasharray: 7 5;
}

.system-relation[data-family="route"] {
  stroke: rgba(177, 143, 245, .46);
  stroke-dasharray: 3 5;
}

.system-relation[data-family="technology"] {
  stroke: rgba(102, 202, 242, .46);
  stroke-dasharray: 10 5;
}

.system-relation[data-family="feedback"] {
  stroke: rgba(117, 190, 239, .36);
  stroke-dasharray: 2 7;
}

.system-relation.is-context-dim {
  opacity: .08;
}

.system-relation.is-filtered {
  opacity: .035;
}

.system-relation.is-related {
  opacity: 1;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px currentColor);
}

.system-relation.is-trace {
  opacity: 1;
  stroke: #fff0f4;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(255, 93, 131, .9));
  animation: signalFlow .52s linear infinite;
}

@keyframes signalFlow {
  to { stroke-dashoffset: -16; }
}

.system-nodes {
  z-index: 5;
  pointer-events: none;
}

.system-node {
  --node: var(--synth-gray);
  position: absolute;
  width: 196px;
  min-height: 76px;
  padding: 13px 14px 13px 51px;
  display: grid;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--node) 42%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--node) 10%, transparent), rgba(7, 14, 24, .97) 64%),
    rgba(7, 14, 24, .97);
  color: #eff5fb;
  text-align: left;
  transform: translate(-50%, -50%);
  box-shadow:
    0 13px 30px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .025);
  cursor: pointer;
  pointer-events: auto;
  transition: opacity .25s, transform .24s var(--ease), border-color .24s, box-shadow .24s, filter .24s;
}

.system-node::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 2px;
  border-radius: 0 3px 3px 0;
  background: var(--node);
  box-shadow: 0 0 12px color-mix(in srgb, var(--node) 55%, transparent);
}

.system-node[data-tone="boundary"] { --node: #dfeaf5; width: 292px; }
.system-node[data-tone="command"] { --node: var(--synth-crimson); width: 218px; }
.system-node[data-tone="claim"] { --node: var(--synth-rose); width: 220px; }
.system-node[data-tone="belief"] { --node: #edb975; }
.system-node[data-tone="false-light"] { --node: #ffd18f; }
.system-node[data-tone="astral"] { --node: var(--synth-violet); }
.system-node[data-tone="council"] { --node: var(--synth-cyan); }
.system-node[data-tone="signal"] { --node: #82e0ef; }
.system-node[data-tone="observer"] { --node: #c09bff; }
.system-node[data-tone="technology"] { --node: #9badc1; }
.system-node[data-tone="earth"] { --node: var(--synth-earth); width: 218px; }
.system-node[data-tone="human"] { --node: var(--synth-human); width: 230px; }

.system-node:hover,
.system-node:focus-visible {
  z-index: 10;
  transform: translate(-50%, calc(-50% - 3px));
  border-color: color-mix(in srgb, var(--node) 78%, white 7%);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, .36),
    0 0 32px color-mix(in srgb, var(--node) 12%, transparent);
}

.system-node.is-selected {
  z-index: 11;
  border-color: var(--node);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--node) 18%, transparent), rgba(8, 15, 25, .98) 70%),
    rgba(8, 15, 25, .98);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .38),
    0 0 0 1px color-mix(in srgb, var(--node) 20%, transparent),
    0 0 36px color-mix(in srgb, var(--node) 18%, transparent);
}

.system-node.is-neighbor:not(.is-selected) {
  border-color: color-mix(in srgb, var(--node) 64%, transparent);
}

.system-node.is-context-dim {
  opacity: .34;
  filter: saturate(.55);
}

.system-node.is-filtered {
  opacity: .12;
  pointer-events: none;
  filter: grayscale(.8);
}

.system-node.is-trace {
  opacity: 1;
  border-color: #fff;
  filter: none;
  animation: nodeSignal .62s var(--ease) both;
}

@keyframes nodeSignal {
  0% { transform: translate(-50%, -50%) scale(.94); }
  48% { transform: translate(-50%, -50%) scale(1.055); box-shadow: 0 0 42px color-mix(in srgb, var(--node) 48%, transparent); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.system-node-symbol {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--node) 35%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--node) 7%, rgba(4, 9, 16, .8));
  color: var(--node);
  font-family: var(--serif);
  font-size: 17px;
  transform: translateY(-50%);
}

.system-node-code {
  color: color-mix(in srgb, var(--node) 82%, white 5%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.2;
}

.system-node strong {
  max-width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #f0f4f8;
  font-family: var(--serif);
  font-size: clamp(16px, 1.05vw, 18px);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.08;
}

.system-node small {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #8fa0b4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.system-legend {
  position: absolute;
  z-index: 12;
  top: 142px;
  left: 20px;
  width: 226px;
  padding: 16px;
  border: 1px solid rgba(157, 193, 221, .16);
  border-radius: 13px;
  background: rgba(6, 13, 22, .91);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .22);
}

.system-legend h3 {
  margin: 0 0 12px;
  color: #acb9c9;
  font-size: 11px;
  letter-spacing: .13em;
}

.system-legend ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.system-legend li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  color: #9baabd;
  font-size: 12px;
  line-height: 1.35;
}

.relation-swatch {
  height: 1px;
  background: #a3b0c0;
}

.relation-swatch.command {
  background: var(--synth-crimson);
}

.relation-swatch.influence {
  background: repeating-linear-gradient(90deg, #edb975 0 5px, transparent 5px 8px);
}

.relation-swatch.route {
  background: repeating-linear-gradient(90deg, var(--synth-violet) 0 3px, transparent 3px 6px);
}

.relation-swatch.technology {
  background: repeating-linear-gradient(90deg, var(--synth-cyan) 0 8px, transparent 8px 11px);
}

.relation-swatch.feedback {
  background: repeating-linear-gradient(90deg, var(--synth-earth) 0 2px, transparent 2px 6px);
}

.system-legend p {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(157, 193, 221, .11);
  color: #77879a;
  font-size: 11px;
  line-height: 1.5;
}

.system-dossier {
  --dossier-accent: var(--synth-crimson);
  position: sticky;
  top: calc(var(--header-height) + 18px);
  min-width: 0;
  max-height: calc(100vh - var(--header-height) - 36px);
  overflow: auto;
  border: 1px solid rgba(157, 193, 221, .2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--dossier-accent) 9%, transparent), transparent 29%),
    linear-gradient(180deg, rgba(10, 18, 30, .98), rgba(5, 11, 20, .98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
  scrollbar-color: color-mix(in srgb, var(--dossier-accent) 45%, transparent) transparent;
}

.system-dossier[data-tone="boundary"] { --dossier-accent: #dfeaf5; }
.system-dossier[data-tone="command"] { --dossier-accent: var(--synth-crimson); }
.system-dossier[data-tone="claim"] { --dossier-accent: var(--synth-rose); }
.system-dossier[data-tone="belief"] { --dossier-accent: #edb975; }
.system-dossier[data-tone="false-light"] { --dossier-accent: #ffd18f; }
.system-dossier[data-tone="astral"] { --dossier-accent: var(--synth-violet); }
.system-dossier[data-tone="council"] { --dossier-accent: var(--synth-cyan); }
.system-dossier[data-tone="signal"] { --dossier-accent: #82e0ef; }
.system-dossier[data-tone="observer"] { --dossier-accent: #c09bff; }
.system-dossier[data-tone="technology"] { --dossier-accent: #9badc1; }
.system-dossier[data-tone="earth"] { --dossier-accent: var(--synth-earth); }
.system-dossier[data-tone="human"] { --dossier-accent: var(--synth-human); }

.system-dossier-idline {
  position: sticky;
  z-index: 4;
  top: 0;
  min-height: 62px;
  padding: 13px 16px 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(157, 193, 221, .16);
  border-radius: 22px 22px 0 0;
  background: rgba(8, 16, 27, .96);
  backdrop-filter: blur(18px);
}

.system-dossier-idline > span {
  overflow-wrap: anywhere;
  color: var(--dossier-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.4;
}

.system-dossier-idline button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(157, 193, 221, .2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  color: #9baabc;
  cursor: pointer;
}

.system-dossier-idline button:hover,
.system-dossier-idline button:focus-visible {
  border-color: var(--dossier-accent);
  color: white;
}

.system-dossier-body {
  min-width: 0;
  padding: 32px;
}

.system-dossier-volume {
  margin: 0 0 14px;
  color: var(--dossier-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.system-dossier h2 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #f3f6fa;
  font-family: var(--serif);
  font-size: clamp(38px, 3.2vw, 58px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .98;
}

.system-dossier-subtitle {
  margin: 16px 0 0;
  overflow-wrap: anywhere;
  color: color-mix(in srgb, var(--dossier-accent) 72%, white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.system-dossier-role {
  margin: 22px 0 0;
  color: #cbd6e1;
  font-size: 17px;
  line-height: 1.7;
}

.system-dossier-facts {
  margin: 25px 0 0;
  display: grid;
  gap: 9px;
}

.system-dossier-fact {
  padding: 14px 15px;
  border: 1px solid rgba(157, 193, 221, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
}

.system-dossier-fact dt {
  color: #8191a5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.system-dossier-fact dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: #c9d4df;
  font-size: 14px;
  line-height: 1.58;
}

.system-location,
.system-relationships {
  margin-top: 27px;
}

.system-location h3,
.system-relationships h3 {
  margin: 0 0 12px;
  color: #8797aa;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.system-location ol {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  counter-reset: location;
}

.system-location li {
  min-height: 34px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(157, 193, 221, .15);
  border-radius: 8px;
  color: #a9b7c7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  counter-increment: location;
}

.system-location li::before {
  content: counter(location, decimal-leading-zero);
  color: var(--dossier-accent);
  font-family: var(--serif);
  font-size: 13px;
}

.system-guardrail {
  margin: 27px 0 0;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--dossier-accent) 26%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--dossier-accent) 5%, transparent);
  color: #bdc9d5;
  font-size: 14px;
  line-height: 1.6;
}

.system-guardrail b {
  display: block;
  margin-bottom: 5px;
  color: var(--dossier-accent);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.system-dossier blockquote {
  margin: 27px 0 0;
  padding: 0 0 0 17px;
  border-left: 2px solid var(--dossier-accent);
  color: #d5dde6;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}

.system-relationships ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.system-relationships button {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid rgba(157, 193, 221, .15);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.system-relationships button:hover,
.system-relationships button:focus-visible {
  border-color: color-mix(in srgb, var(--dossier-accent) 60%, transparent);
  background: color-mix(in srgb, var(--dossier-accent) 5%, transparent);
}

.system-relation-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.system-relation-direction {
  color: #7f90a4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.system-relation-target {
  overflow-wrap: anywhere;
  color: #d1dbe5;
  font-size: 14px;
  line-height: 1.4;
}

.system-relation-arrow {
  color: var(--dossier-accent);
  font-family: var(--serif);
  font-size: 17px;
}

.dossier-parent-link {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(157, 193, 221, .13);
}

.dossier-parent-link a {
  min-height: 46px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--dossier-accent) 44%, transparent);
  border-radius: 9px;
  color: #e7eef5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.dossier-parent-link a:hover {
  background: color-mix(in srgb, var(--dossier-accent) 8%, transparent);
}

.route-primer {
  width: var(--synthetic-page);
  margin: 0 auto;
  padding: 30px 0 120px;
  display: grid;
  grid-template-columns: .38fr 1.62fr;
  gap: 70px;
}

.route-primer h2,
.system-laws h2,
.atlas-return h2 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(46px, 4.2vw, 72px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .96;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.route-grid article {
  min-height: 240px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(157, 193, 221, .16);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(239, 80, 118, .045), transparent 42%),
    rgba(7, 14, 24, .7);
}

.route-grid article:last-child {
  grid-column: 1 / -1;
  min-height: 210px;
}

.route-grid article > span {
  color: #df8ca2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.route-grid h3 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.15;
}

.route-grid p {
  margin: 13px 0 20px;
  color: #9eacbd;
  font-size: 15px;
  line-height: 1.65;
}

.route-grid button {
  width: max-content;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e6c0cb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.route-grid button:hover,
.route-grid button:focus-visible {
  color: white;
}

.system-laws {
  width: var(--synthetic-page);
  margin: 0 auto;
  padding: 86px 0 120px;
  display: grid;
  grid-template-columns: .56fr 1.44fr;
  gap: 80px;
  border-top: 1px solid rgba(157, 193, 221, .13);
}

.system-laws ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
}

.system-laws li {
  min-height: 180px;
  padding: 23px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 17px;
  border: 1px solid rgba(157, 193, 221, .16);
  border-radius: 14px;
  background: rgba(7, 14, 24, .64);
}

.system-laws li > span {
  color: #d77d95;
  font-family: var(--serif);
  font-size: 25px;
}

.system-laws b {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.2;
}

.system-laws p {
  margin: 10px 0 0;
  color: #9caabd;
  font-size: 15px;
  line-height: 1.6;
}

.atlas-return {
  width: var(--synthetic-page);
  margin: 0 auto 120px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 60px;
  border: 1px solid rgba(242, 92, 121, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 15%, rgba(238, 74, 113, .09), transparent 30%),
    linear-gradient(120deg, rgba(44, 17, 35, .48), rgba(7, 15, 25, .78));
}

.atlas-return h2 {
  font-size: clamp(40px, 3.3vw, 60px);
}

.atlas-return > p {
  color: #acbacb;
  font-size: 16px;
  line-height: 1.7;
}

.synthetic-footer {
  border-top-color: rgba(242, 92, 121, .16);
}

@media (max-width: 1380px) {
  .synthetic-atlas {
    --synthetic-page: min(1280px, calc(100vw - 40px));
  }

  .synthetic-hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, .72fr);
    gap: 58px;
  }

  .system-workspace {
    grid-template-columns: minmax(720px, 1.4fr) minmax(380px, .72fr);
  }

  .system-dossier-body {
    padding: 27px;
  }
}

@media (max-width: 1080px) {
  .synthetic-atlas {
    --synthetic-page: calc(100vw - 32px);
  }

  .synthetic-hero {
    min-height: auto;
    padding-top: 90px;
    grid-template-columns: 1fr;
  }

  .synthetic-hero-copy {
    max-width: 850px;
  }

  .containment-stack {
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
  }

  .containment-arrow {
    display: none;
  }

  .containment-item {
    min-height: 150px;
  }

  .lens-bar {
    grid-template-columns: 1fr;
  }

  .trace-group {
    grid-row: 2;
  }

  .system-status {
    grid-row: 3;
  }

  .system-workspace {
    grid-template-columns: 1fr;
  }

  .system-dossier {
    position: relative;
    top: auto;
    max-height: none;
  }

  .system-dossier-facts {
    grid-template-columns: 1fr 1fr;
  }

  .route-primer,
  .system-laws {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .atlas-return {
    grid-template-columns: 1fr 1fr;
  }

  .atlas-return .button {
    grid-column: 1 / -1;
    width: max-content;
  }
}

@media (max-width: 760px) {
  .synthetic-atlas {
    --synthetic-page: calc(100vw - 24px);
  }

  .synthetic-hero {
    padding: 72px 0 58px;
    gap: 40px;
  }

  .synthetic-hero h1 {
    font-size: clamp(54px, 15vw, 78px);
    line-height: .9;
  }

  .synthetic-hero-deck {
    font-size: 18px;
  }

  .synthetic-actions .button {
    width: 100%;
  }

  .containment-stack {
    padding: 11px;
    grid-template-columns: 1fr;
  }

  .containment-item {
    min-height: 112px;
  }

  .synthetic-stats {
    grid-template-columns: 1fr 1fr;
  }

  .synthetic-stats div {
    min-height: 82px;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .systems-section {
    padding: 76px 0 90px;
  }

  .systems-heading h2 {
    font-size: clamp(46px, 12.5vw, 64px);
  }

  .scope-guardrail {
    grid-template-columns: auto 1fr;
  }

  .scope-guardrail a {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .lens-bar {
    margin-top: 12px;
    padding: 11px;
  }

  .lens-group {
    align-items: stretch;
    flex-direction: column;
  }

  .lens-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .lens-button,
  .system-control {
    min-height: 46px;
  }

  .trace-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .trace-group .system-control:last-child {
    grid-column: 1 / -1;
  }

  .systems-viewport {
    min-height: 0;
    overflow: visible;
    border-radius: 16px;
  }

  .map-zoom-controls,
  .system-connections,
  .system-band,
  .sector-label {
    display: none;
  }

  .systems-stage {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 72px 11px 92px;
    overflow: visible;
    transform: none !important;
    background:
      linear-gradient(180deg, rgba(164, 49, 89, .055), transparent 45%, rgba(57, 150, 213, .06)),
      rgba(4, 9, 17, .92);
  }

  .systems-stage::after {
    inset: 52px 6px 55px;
    border-radius: 20px;
  }

  .stage-coordinate {
    left: 16px;
  }

  .system-nodes {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    display: grid;
    gap: 10px;
  }

  .system-node,
  .system-node[data-tone] {
    position: relative;
    inset: auto !important;
    width: 100%;
    min-height: 88px;
    padding: 15px 15px 15px 58px;
    transform: none;
  }

  .system-node:hover,
  .system-node:focus-visible,
  .system-node.is-trace {
    transform: translateY(-2px);
  }

  .system-node.is-filtered {
    display: none;
  }

  .system-node-symbol {
    left: 13px;
    width: 34px;
    height: 34px;
  }

  .system-node strong {
    font-size: 20px;
  }

  .system-node small {
    font-size: 11px;
  }

  .system-legend {
    position: relative;
    inset: auto;
    width: auto;
    margin: 18px 0 0;
  }

  .system-dossier {
    border-radius: 16px;
  }

  .system-dossier-idline {
    border-radius: 16px 16px 0 0;
  }

  .system-dossier-body {
    padding: 26px 20px 32px;
  }

  .system-dossier h2 {
    font-size: clamp(38px, 11.5vw, 54px);
    line-height: 1;
  }

  .system-dossier-role {
    font-size: 16px;
  }

  .system-dossier-facts {
    grid-template-columns: 1fr;
  }

  .route-primer,
  .system-laws {
    padding-bottom: 88px;
  }

  .route-grid,
  .system-laws ol {
    grid-template-columns: 1fr;
  }

  .route-grid article,
  .route-grid article:last-child {
    grid-column: auto;
    min-height: 220px;
  }

  .system-laws li {
    min-height: 150px;
  }

  .atlas-return {
    margin-bottom: 88px;
    padding: 28px 22px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .atlas-return .button {
    grid-column: auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .systems-stage,
  .system-node,
  .system-relation {
    transition: none;
  }

  .system-node.is-trace,
  .system-relation.is-trace {
    animation: none;
  }
}
