body {
  background: radial-gradient(ellipse at 90% 0%, #405f64 0, transparent 54%), #1e333c;
}
.signal-hero {
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  min-height: 230px;
  aspect-ratio: 3.3;
  background:
    linear-gradient(90deg, #182934e8 0%, #1c3337b5 40%, transparent 73%),
    url(assets/protocol-canal.webp) center 44% / cover;
  border: 1px solid #899b8d;
  border-radius: 15px;
  margin: 18px 0;
  padding: clamp(17px, 3vw, 35px);
}
.signal-hero h1 {
  font: 700 clamp(37px, 4vw, 58px)/1 var(--pixel);
  margin: 4px 0;
  color: #fff2cf;
}
.signal-hero p {
  max-width: 57%;
  margin: 6px 0 12px;
}
.signal-hero .cat {
  left: 78%;
  width: 11%;
  bottom: 4%;
}
.handover {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 11px;
}
.handover a {
  padding: 12px 14px;
  border: 1px solid #738b8c;
  text-decoration: none;
  border-radius: 9px;
  background: #29454d;
}
.handover b {
  display: block;
  font: 700 21px var(--pixel);
}
.handover small {
  color: #d5e3da;
}
.wirebox {
  position: relative;
  background:
    linear-gradient(#0a282a12, #0c252572),
    url(assets/protocol-canal.webp) center 53% / cover;
  padding: 12px;
}
.wirebox .placard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 9px;
  color: #342c24;
}
.placard span {
  background: #fff0cc;
  border: 1px solid #a6936d;
  padding: 3px 8px;
  border-radius: 5px;
  font: 700 clamp(14px, 2vw, 18px) var(--pixel);
}
.circuit {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(140deg, #102e35f0, #194342ee);
  border: 2px solid #9e9872;
  border-radius: 10px;
  box-shadow: inset 0 0 18px #152326;
}
.circuit .rail {
  fill: none;
  stroke: #6d8a84;
  stroke-width: 6;
  stroke-linecap: round;
}
.circuit .powered {
  stroke: #ffd47a;
  stroke-width: 8;
}
.circuit .socket-dot {
  fill: #d9cf9a;
  stroke: #203b39;
  stroke-width: 3;
}
.circuit .destination {
  fill: #223b41;
  stroke: #75938d;
  stroke-width: 1.3;
}
.circuit .live-port {
  fill: #fae6a6;
  stroke: #dcc17d;
}
.circuit text {
  font:
    700 14px Nunito,
    sans-serif;
  fill: #f4f3d5;
  dominant-baseline: middle;
}
.circuit .active-label {
  fill: #34403a;
}
.circuit .knob {
  fill: #fcdaa0;
  stroke: #675c44;
  stroke-width: 2;
}
.circuit .knobtext {
  fill: #3b463c;
  text-anchor: middle;
  font: 700 19px var(--pixel);
}
.lever {
  min-width: 105px;
}
.switches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0;
}
.wire-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow: auto;
  font:
    500 0.83rem/1.45 ui-monospace,
    monospace;
  color: #ecf1dd;
  background: #142a32;
  padding: 8px;
  border-radius: 6px;
}
.pouches {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.pouches span {
  border: 1px solid #637877;
  border-radius: 7px;
  padding: 3px 7px;
  font-size: 0.85rem;
}
.pouches .now {
  background: #f7db9d;
  color: #3f453a;
}
.wirebox .tube {
  fill: #fff0ad;
  stroke: #a06d36;
  stroke-width: 2;
}
.case-stamps {
  margin: 9px 0;
}
.moved {
  animation: signalflash 0.4s ease-out;
}
@keyframes signalflash {
  50% {
    filter: brightness(1.45);
  }
}
.visit-strip {
  display: block;
  background: #ebefdb;
  color: #314c40;
  font-weight: 850;
  text-align: center;
  padding: 7px;
  border-bottom: 1px solid #bbc9ae;
}
@media (max-width: 650px) {
  .signal-hero {
    aspect-ratio: auto;
  }
  .signal-hero p {
    max-width: 81%;
  }
  .wirebox {
    padding: 6px;
  }
  .circuit text {
    font-size: 17px;
  }
  .switches {
    gap: 5px;
  }
  .switches button {
    padding: 6px 8px;
    min-width: 0;
  }
}
