/* byteomi-systems/electrical-systems.html — Electrical System Flow */

.doc-byteomi-preset.doc-byteomi-preset--hero.doc-byteomi-preset--electrical-flow {
  max-width: min(100%, 68rem);
  margin-inline: auto;
}

.doc-byteomi-preset--electrical-flow .doc-byteomi-preset__tag {
  color: rgba(130, 235, 255, 0.95);
}

.doc-byteomi-preset--electrical-flow .doc-byteomi-preset__viewport {
  min-height: 300px;
}

.doc-byteomi-preset__viewport-wrap--flow {
  position: relative;
}

.doc-flow-scope {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* —— System console (oscilloscope-adjacent controls) —— */
.doc-flow-console {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(70, 120, 180, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 14, 28, 0.85) 0%, rgba(4, 10, 22, 0.9) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 11px,
      rgba(60, 100, 150, 0.06) 11px,
      rgba(60, 100, 150, 0.06) 12px
    );
  font-family: "JetBrains Mono", ui-monospace, monospace;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.doc-flow-console__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(80, 130, 190, 0.18);
}

.doc-flow-console__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(100, 160, 210, 0.75);
}

.doc-flow-console__status {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(46, 231, 242, 0.95);
  letter-spacing: 0.04em;
}

.doc-flow-console__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
}

.doc-flow-console__btn {
  padding: 0.38rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(46, 231, 242, 0.35);
  background: rgba(12, 28, 48, 0.8);
  color: rgba(220, 240, 255, 0.95);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.doc-flow-console__btn:hover {
  background: rgba(20, 42, 68, 0.9);
  border-color: rgba(46, 231, 242, 0.55);
}

.doc-flow-console__btn:focus-visible {
  outline: 2px solid rgba(46, 231, 242, 0.5);
  outline-offset: 2px;
}

.doc-flow-console__field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.doc-flow-console__field-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(130, 170, 210, 0.8);
  width: 2.4rem;
  flex-shrink: 0;
}

.doc-flow-console__field input[type="range"] {
  width: 5rem;
  height: 4px;
  accent-color: #2ee7f2;
  cursor: pointer;
}

.doc-flow-console__readout {
  margin: 0.5rem 0 0;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(150, 185, 220, 0.82);
  line-height: 1.4;
}

.doc-byteomi-preset__pipeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-byteomi-preset__pipeline-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(110, 150, 210, 0.16);
  background: rgba(8, 14, 28, 0.55);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(190, 210, 240, 0.82);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.doc-byteomi-preset__pipeline-legend li.is-active {
  border-color: rgba(46, 231, 242, 0.55);
  background: rgba(12, 32, 52, 0.85);
  color: rgba(240, 252, 255, 0.99);
  box-shadow:
    0 0 16px rgba(46, 231, 242, 0.2),
    0 0 0 1px rgba(46, 231, 242, 0.12) inset;
  transform: scale(1.02);
}

.doc-byteomi-preset__pipeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--pipe-color, #2ee7f2);
  box-shadow: 0 0 8px var(--pipe-color, #2ee7f2);
}

.doc-byteomi-preset__pipeline-legend li.is-active .doc-byteomi-preset__pipeline-dot {
  box-shadow: 0 0 14px var(--pipe-color, #2ee7f2);
}

.doc-byteomi-preset__hint--flow-hud {
  display: grid;
  gap: 0.28rem;
  font-size: 0.75rem;
}

.doc-byteomi-preset__hint--flow-hud span {
  display: block;
}

@media (max-width: 640px) {
  .doc-byteomi-preset__pipeline-legend {
    flex-direction: column;
  }

  .doc-flow-console__grid {
    flex-direction: column;
    align-items: stretch;
  }

  .doc-flow-console__field input[type="range"] {
    flex: 1;
    width: 100%;
    min-width: 0;
  }
}
