.atlas-reference {
  --atlas-sheet: #eff6fd;
  --atlas-ink: #122941;
  --atlas-ink-soft: #33506a;
  --atlas-edge: #bed4e8;
  --atlas-blue: #1d5e94;
  --atlas-teal: #136267;
  scroll-margin-block-start: 24px;
}
.atlas-reference :is(.ref-lead, .ref-prose p) { max-width: 77ch; }
.atlas-reference .ref-graphic {
  margin: 24px 0;
  padding: clamp(16px, 3.2vw, 36px);
  border: 1px solid var(--atlas-edge);
  border-radius: 14px;
  background: var(--atlas-sheet);
  color: var(--atlas-ink);
}
.atlas-reference .ref-graphic :is(strong, b) { color: var(--atlas-ink); }
.atlas-reference .ref-graphic figcaption {
  margin: 22px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--atlas-edge);
  color: var(--atlas-ink-soft);
  font-size: .9rem;
}
.atlas-reference .ref-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: clamp(14px, 3vw, 32px);
  align-items: end;
}
.atlas-reference :is(.ref-drawing-item, .ref-topology-item) {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: end;
}
.atlas-reference .ref-graphic small {
  color: var(--atlas-ink-soft);
  font-size: .84rem;
  line-height: 1.35;
}
.atlas-reference .ref-chassis {
  display: block;
  position: relative;
  height: var(--height, 58px);
  width: min(100%, var(--width, 205px));
  margin-bottom: 5px;
  border: 2px solid #284965;
  border-radius: 4px;
  background: repeating-linear-gradient(0deg,#264963 0 3px,#16344f 3px 7px);
  box-shadow: inset 6px 0 #aac5dc, inset -6px 0 #aac5dc;
}
.atlas-reference .ref-chassis::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #81ded2;
}
.atlas-reference .ref-module {
  display: grid;
  place-items: center;
  width: 72px;
  height: 56px;
  margin-bottom: 5px;
  border: 2px solid #386a76;
  border-radius: 5px;
  background: repeating-linear-gradient(90deg, #d6edef 0 5px,#a4ccd1 5px 7px);
}
.atlas-reference .ref-module::after {
  content: "";
  width: 29px;
  height: 25px;
  border-radius: 2px;
  background: #153c50;
  outline: 1px solid #e6f3f4;
  outline-offset: 3px;
}
.atlas-reference .ref-meters { display: grid; gap: 14px; }
.atlas-reference .ref-meter-row {
  display: grid;
  grid-template-columns: minmax(92px, .7fr) minmax(0, 2fr) minmax(36px, auto);
  align-items: center;
  gap: 12px;
}
.atlas-reference .ref-track { height: 18px; border-radius: 3px; background: #d7e5f1; }
.atlas-reference .ref-fill {
  display: block;
  width: var(--portion, 100%);
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(90deg,var(--atlas-blue) 0 calc(10% - 1px),#93b7d4 calc(10% - 1px) 10%);
}
.atlas-reference .ref-fill.ref-fill-alt { background: var(--atlas-teal); }
.atlas-reference .ref-topology {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(85px,.6fr) minmax(0,1fr);
  align-items: center;
  gap: clamp(8px,2vw,22px);
}
.atlas-reference .ref-topology-item { text-align: center; }
.atlas-reference .ref-chip-bank {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: clamp(4px,1vw,10px);
  padding: clamp(5px,1.3vw,12px);
  border: 1px solid #6d8fab;
  border-radius: 6px;
  background: #d8e9f8;
}
.atlas-reference .ref-chip {
  min-height: 19px;
  aspect-ratio: 1.4;
  border: 1px solid #2b679b;
  border-radius: 3px;
  background: linear-gradient(135deg,#3178a8,#154b7a);
  box-shadow: inset 0 0 0 2px #c6e2fc3b;
}
.atlas-reference .ref-bridge {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
}
.atlas-reference .ref-bridge::before {
  content: "";
  height: 7px;
  width: 100%;
  border-block: 1px solid #27669a;
  background: repeating-linear-gradient(90deg,#27669a 0 5px,transparent 5px 9px);
}
.atlas-reference .ref-cabinets { display: flex; gap: 4px; min-height: 67px; align-items: end; }
.atlas-reference .ref-cabinet {
  flex: 0 1 16px;
  width: 16px;
  min-width: 4px;
  height: 62px;
  border: 1px solid #284965;
  border-radius: 2px;
  background: repeating-linear-gradient(0deg,#215d90 0 4px,#3c81b5 4px 5px);
}
.atlas-reference .ref-cabinet.ref-bus {
  border-color: #487779;
  background: repeating-linear-gradient(0deg,#13828a 0 4px,#60a9a9 4px 5px);
}
.atlas-reference .ref-prose { display: grid; gap: 14px; margin-block: 20px; }
.atlas-reference .ref-prose :is(h3,p) { margin: 0; }
.atlas-reference .ref-prose h3 { margin-bottom: 4px; font-size: clamp(1.12rem, 2vw, 1.34rem); }
.atlas-reference .ref-table { margin-bottom: 20px; }
.atlas-reference .ref-table table { min-width: var(--table-width, 575px); }
.atlas-reference .ref-table tbody th { white-space: normal; }
.atlas-reference .ref-sources { border-top: 1px solid var(--line,#34495f); padding-top: 12px; margin-top: 22px; }
.atlas-reference .ref-sources summary { width: fit-content; cursor: pointer; font-weight: 650; }
.atlas-reference .ref-sources ul { margin-block: 8px 0; padding-inline-start: 22px; }
.atlas-reference :is(.ref-sources summary,.ref-table):focus-visible { outline: 2px solid #92ceff; outline-offset: 4px; }
.ref-jump { align-self: center; }
@media (max-width: 590px) {
  .atlas-reference .ref-grid { grid-template-columns: repeat(var(--mobile-columns, 2), minmax(0,1fr)); }
  .atlas-reference .ref-drawing-item:has(.ref-chassis) { align-content: end; }
  .atlas-reference .ref-cabinet { flex-basis: 12px; }
  .atlas-reference .ref-meter-row { grid-template-columns: minmax(0,1fr) auto; gap: 5px 8px; }
  .atlas-reference .ref-meter-row b { grid-column: 2; grid-row: 1; }
  .atlas-reference .ref-meter-row .ref-track { grid-column: 1 / -1; grid-row: 2; }
}
