.bh-lab {
  --bh-ink: #f6f2e8;
  --bh-muted: #a8b2c3;
  --bh-panel: rgba(12, 15, 24, 0.72);
  --bh-line: rgba(255, 255, 255, 0.16);
  --bh-blue: #4dd7ff;
  --bh-gold: #ffe27a;
  --bh-red: #ff4d6d;
  --bh-warp: 0.58;

  gap: 18px;
  width: min(100%, 1180px);
  margin-inline: auto;
  color: var(--bh-ink);
}

.bh-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 226, 122, calc(0.05 + var(--bh-warp) * 0.11)), transparent 19rem),
    linear-gradient(145deg, #080a11 0%, #121a27 52%, #080910 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.bh-stage {
  position: relative;
  min-width: 0;
}

.bh-visual {
  position: relative;
  min-height: 390px;
}

.bh-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 390px;
}

.bh-space {
  fill: transparent;
}

.bh-stars circle {
  fill: rgba(255, 255, 255, 0.8);
  opacity: calc(0.16 + var(--bh-warp) * 0.58);
  transform-origin: 380px 310px;
}

.bh-disk {
  fill: none;
  stroke: url("#bh-disk");
  stroke-linecap: round;
  transform-origin: 380px 314px;
}

.bh-disk-back {
  opacity: 0.5;
  stroke-width: 17;
  filter: url("#bh-blur");
}

.bh-disk-front {
  opacity: 0.88;
  stroke-width: 8;
  stroke-dasharray: 520 160;
  animation: bh-flow 6s linear infinite;
}

.bh-horizon {
  fill: url("#bh-core-glow");
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2;
}

.bh-horizon-glow {
  fill: rgba(0, 0, 0, 0.2);
  stroke: rgba(255, 210, 102, 0.24);
  stroke-width: 16;
  filter: url("#bh-blur");
}

.bh-photon,
.bh-isco {
  fill: none;
  stroke-width: 2;
  transform-origin: 380px 310px;
}

.bh-photon {
  stroke: rgba(77, 215, 255, 0.52);
  stroke-dasharray: 5 9;
  animation: bh-spin 12s linear infinite;
}

.bh-isco {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-dasharray: 2 14;
  animation: bh-spin 20s linear infinite reverse;
}

.bh-probe circle {
  fill: #fff;
  filter: drop-shadow(0 0 14px rgba(77, 215, 255, 0.9));
}

.bh-probe path {
  fill: var(--bh-blue);
}

.bh-label {
  color: #dbe7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bh-label line {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1;
}

.bh-label text {
  fill: currentcolor;
}

.bh-readout {
  display: grid;
  gap: 7px;
  padding: 0 18px 20px;
}

.bh-readout span {
  color: var(--bh-blue);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bh-readout strong {
  font-size: clamp(2.3rem, 10vw, 4.8rem);
  font-weight: 700;
  line-height: 0.95;
}

.bh-readout p {
  max-width: 62ch;
  margin: 0;
  color: var(--bh-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.bh-controls {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 0 18px 18px;
}

.bh-kpis,
.bh-orbit-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bh-kpis div,
.bh-orbit-panel div {
  min-height: 96px;
  border: 1px solid var(--bh-line);
  border-radius: 8px;
  padding: 13px;
  background: var(--bh-panel);
}

.bh-kpis span,
.bh-orbit-panel span,
.bh-slider span {
  display: block;
  color: var(--bh-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.24;
}

.bh-kpis strong,
.bh-orbit-panel strong {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: clamp(1.42rem, 7vw, 2.45rem);
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  overflow-wrap: anywhere;
}

.bh-sliders {
  display: grid;
  gap: 22px;
  padding: 8px 0 2px;
}

.bh-slider {
  position: relative;
  display: grid;
  gap: 11px;
  padding-bottom: 20px;
}

.bh-slider output {
  position: absolute;
  left: var(--value-x, 50%);
  bottom: 0;
  color: var(--bh-gold);
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateX(-50%) translateY(3px);
  transition: opacity 150ms ease, transform 150ms ease;
  white-space: nowrap;
}

.bh-slider:hover output,
.bh-slider:focus-within output {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bh-slider input {
  width: 100%;
  height: 32px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.bh-slider input::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bh-blue), var(--bh-gold), var(--bh-red));
}

.bh-slider input::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bh-blue), var(--bh-gold), var(--bh-red));
}

.bh-slider input::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  border: 2px solid #10131d;
  border-radius: 999px;
  appearance: none;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(255, 226, 122, 0.58);
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.bh-slider input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #10131d;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(255, 226, 122, 0.58);
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.bh-slider input:hover::-webkit-slider-thumb,
.bh-slider input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 9px rgba(255, 226, 122, 0.16), 0 0 24px rgba(255, 226, 122, 0.78);
  transform: scale(1.25);
}

.bh-slider input:hover::-moz-range-thumb,
.bh-slider input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 9px rgba(255, 226, 122, 0.16), 0 0 24px rgba(255, 226, 122, 0.78);
  transform: scale(1.25);
}

@keyframes bh-flow {
  to {
    stroke-dashoffset: -680;
  }
}

@keyframes bh-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 820px) {
  .bh-card {
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    align-items: stretch;
  }

  .bh-stage,
  .bh-controls {
    min-height: 650px;
  }

  .bh-readout {
    position: absolute;
    inset: auto 30px 28px;
    padding: 0;
  }

  .bh-controls {
    align-content: center;
    padding: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .bh-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-light .bh-lab {
  --bh-ink: #131721;
  --bh-muted: #596475;
  --bh-panel: rgba(255, 255, 255, 0.78);
  --bh-line: rgba(19, 23, 33, 0.13);
}

.theme-light .bh-card {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 167, 61, calc(0.08 + var(--bh-warp) * 0.12)), transparent 19rem),
    linear-gradient(145deg, #f7fbff 0%, #edf3f7 52%, #fff 100%);
  box-shadow: 0 26px 76px rgba(28, 40, 58, 0.14);
}

.theme-light .bh-controls {
  border-left-color: rgba(19, 23, 33, 0.1);
}

.theme-light .bh-stars circle {
  fill: rgba(20, 31, 48, 0.46);
}

.theme-light .bh-label {
  color: #334055;
}

.theme-light .bh-label line {
  stroke: rgba(19, 23, 33, 0.24);
}

.theme-light .bh-kpis strong,
.theme-light .bh-orbit-panel strong {
  color: #111827;
}
