/* Boot and fault readout over the 3D viewer */
.flow-hud {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 3;
  width: min(290px, 72%);
  padding: 10px 12px;
  border-radius: 9px;
  background: rgb(20 28 107 / 0.92);
  color: #f4f1fa;
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 6px 22px rgb(18 22 51 / 0.2);
}
.flow-hud p {
  margin: 0;
}
.flow-hud-title {
  font-size: 9px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ouro-claro);
  font-weight: 700;
}
.flow-hud-status {
  font-size: 12px;
  font-weight: 600;
  margin: 3px 0 8px !important;
}
.flow-hud-leds {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.flow-led {
  flex: 1;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 0;
  border-radius: 4px;
  background: #34313f;
  color: #8f8a9c;
}
.flow-led[data-state='ok'] {
  background: #2f6f3e;
  color: #e3f7e7;
}
.flow-led[data-state='on'] {
  background: #c98a12;
  color: #1d1b26;
}
.flow-led[data-state='fail'],
.flow-led[data-state='blink'] {
  background: #c0362c;
  color: #fff;
}
.flow-led[data-state='blink'] {
  animation: flow-blink .8s steps(2, jump-none) infinite;
}
@keyframes flow-blink {
  50% {
    background: #34313f;
    color: #8f8a9c;
  }
}
.flow-hud-temp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.flow-hud-temp b {
  min-width: 78px;
  font-variant-numeric: tabular-nums;
}
.flow-meter {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #34313f;
  overflow: hidden;
}
.flow-meter i {
  display: block;
  height: 100%;
  background: #3fbf5f;
  transition: width .2s linear;
}
.flow-hud-temp[data-level='warm'] .flow-meter i {
  background: #ff9a1f;
}
.flow-hud-temp[data-level='hot'] .flow-meter i {
  background: #e0261b;
}
.flow-hud-temp[data-level='hot'] b {
  color: #ff8a80;
}
.flow-hud-screen {
  color: #d8d2e4;
}
.flow-hud-legend {
  display: flex;
  gap: 10px;
  margin-top: 6px !important;
  font-size: 9px;
  color: #b5aec4;
}
.flow-key::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
}
.flow-key.power::before {
  background: #f5a300;
}
.flow-key.data::before {
  background: #00b7d6;
  border-radius: 2px;
}
.flow-key.heat::before {
  background: #ff5a1f;
}

/* Fault explanation card */
.fault-options .fault-sound {
  background: transparent;
  border-style: dashed;
}
.fault-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--tinta);
}
.fault-card dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 6px 16px;
  margin: 0;
}
.fault-card dt {
  font-weight: 700;
  color: var(--azul);
}
.fault-card dd {
  margin: 0;
}
.fault-card .fault-note {
  margin-top: 10px;
  font-size: 11px;
  color: #8a7c64;
}

/* "Como funciona" inside the piece detail */
.deep-panel {
  margin-top: 8px;
  border-top: 1px solid #e3dbee;
  padding-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: #4f4560;
}
.deep-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: #5e4d77;
  font-size: 11px;
}
.deep-panel p {
  margin: 6px 0;
}
.deep-panel h4 {
  margin: 8px 0 2px;
  font-size: 10px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #8a76a8;
}
.deep-panel ul {
  margin: 0;
  padding-left: 18px;
}
.deep-panel .deep-question {
  background: #f1edf7;
  border-radius: 5px;
  padding: 6px 8px;
  color: #4a3e61;
}

@media (max-width: 700px) {
  .flow-hud {
    top: 0;
    width: 100%;
    padding: 7px 9px;
    font-size: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
  }
  .flow-hud > p {
    flex-basis: 100%;
  }
  .flow-hud-status {
    font-size: 11px;
    margin: 1px 0 5px !important;
  }
  .flow-hud-leds {
    flex: 1 1 52%;
    gap: 3px;
    margin-bottom: 4px;
  }
  .flow-led {
    font-size: 8px;
    padding: 2px 0;
  }
  .flow-hud-temp {
    flex: 1 1 35%;
    margin-bottom: 4px;
  }
  .flow-hud-temp b {
    min-width: 0;
    font-size: 10px;
  }
  .flow-hud .flow-hud-legend {
    margin-top: 2px !important;
  }
  .fault-card dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .fault-card dd {
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-led[data-state='blink'] {
    animation: none;
  }
}
