/* ============================================================
   Bancada de bornes do Neon — a aparência.
   Marrom, azul e preto são as cores dos fios de sensor.
   Verde = corrente passando, igual ao simulador Ladder.
   ============================================================ */

.bn{
  --bn-marrom: #8a5a2b; --bn-azul: #1f64a8; --bn-vivo: var(--verde); --bn-led: #f2b01e;
  margin: 22px 0; padding: 16px;
  border: 1.5px solid var(--tinta); border-radius: 12px; background: var(--caixa);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .bn{ --bn-marrom: #d39a62; --bn-azul: #6fb0ec; }
}
:root[data-theme="dark"] .bn{ --bn-marrom: #d39a62; --bn-azul: #6fb0ec; }

.bn button{
  font: 700 13px/1.2 var(--mono); padding: 8px 12px; min-height: 40px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--linha-forte); background: transparent; color: var(--tinta); touch-action: manipulation;
}
.bn button:hover{ border-color: var(--tinta); }
.bn button[aria-pressed="true"]{ background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.bn button:disabled{ opacity: .35; cursor: not-allowed; }

/* ---- missões */
.bn-abas{ display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--linha); }
.bn .bn-abas button{ border-radius: 8px; }
.bn-missao p{ margin: 12px 0 0; }

/* ---- o desenho */
.bn-desenho{ margin: 12px 0 0; overflow-x: auto; }
.bn-desenho svg{ display: block; width: 100%; min-width: 300px; max-width: 640px; height: auto; margin: 0 auto; }
.bn text{ font-family: var(--mono); font-size: 14px; fill: var(--dim); }
.bn text.forte{ fill: var(--tinta); font-weight: 700; }
.bn text.bn-bit.um{ fill: var(--bn-vivo); }
.bn-caixa{ fill: var(--papel); stroke: var(--linha-forte); stroke-width: 1.5; }
.bn-fio{ fill: none; stroke: var(--tinta); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bn-fio.fino{ stroke-width: 1.5; stroke: var(--linha-forte); }
.bn-fio.marrom{ stroke: var(--bn-marrom); stroke-width: 3.4; }
.bn-fio.azul{ stroke: var(--bn-azul); stroke-width: 3.4; }
.bn-fio.preto{ stroke-width: 3.4; }
.bn-fio.preto.solto{ stroke-dasharray: 2 7; opacity: .55; }
.bn-no{ fill: var(--tinta); }
.bn-borne{ fill: var(--caixa); stroke: var(--tinta); stroke-width: 2; }
.bn-opto{ fill: var(--caixa); stroke: var(--linha-forte); stroke-width: 1.5; }
.bn-face{ fill: var(--linha-forte); }
.bn-esteira{ stroke: var(--linha-forte); stroke-width: 3; stroke-dasharray: 10 6; }
.bn-rolo{ fill: none; stroke: var(--linha-forte); stroke-width: 2; }
.bn-peca{ fill: var(--dim); }
.bn-campo{ fill: var(--linha); opacity: .5; }
.bn-campo.vendo{ fill: var(--bn-led); opacity: .45; }
.bn-led-sensor, .bn-led-clp{ fill: var(--caixa); stroke: var(--linha-forte); stroke-width: 1.5; }
.bn-led-sensor.aceso, .bn-led-clp.aceso{ fill: var(--bn-led); stroke: #9a6a00; filter: drop-shadow(0 0 4px rgba(242,176,30,.8)); }
.bn-corrente{ fill: none; stroke: var(--bn-vivo); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 22; opacity: .9; }

/* ---- os controles */
.bn-controles{ display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; margin: 14px 0 0; }
.bn-grupo{ min-width: 0; }
.bn-titulo{ font: 700 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 0 0 6px; }
.bn-botoes{ display: flex; flex-wrap: wrap; gap: 6px; }
.bn .bn-botoes button{ border-radius: 8px; }
.bn-fixo{ display: block; font: 11px var(--mono); color: var(--fraco); margin-top: 4px; }
.bn [hidden]{ display: none !important; }
.bn-acoes{ display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--linha); }
.bn-conta{ font: 13px/1.6 var(--mono); margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-variant-numeric: tabular-nums; }
.bn .bn-zera{ min-height: 30px; padding: 3px 10px; font-size: 12px; }
.bn-leitura{ font: 13px/1.6 var(--mono); margin: 10px 0 0; min-height: 3.2em; overflow-wrap: anywhere; }

/* ---- o conferidor */
.bn-teste{ margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--linha); }
.bn .bn-confere{ background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.bn .bn-confere:hover{ background: var(--caixa); color: var(--tinta); }
.bn-resultado{ list-style: none; padding: 0; margin: 10px 0 0; font: 13px/1.6 var(--mono); }
.bn-resultado li{ margin: 2px 0; }
.bn-resultado .ok{ color: var(--verde); }
.bn-resultado .falhou{ color: var(--vermelho); }
.bn-resultado .total{ margin-top: 8px; font-weight: 700; color: var(--tinta); }
.bn-resultado .total.ok{ color: var(--verde); }

@media (max-width: 600px){
  .bn{ padding: 12px; }
  .bn text{ font-size: 16px; }
}
/* no celular o bornes.js recorta a caixa da fonte do desenho; as etiquetas dos trilhos mudam de lugar */
.bn.estreito .so-largo, .bn:not(.estreito) .so-cel{ display: none; }
@media print{ .bn-controles, .bn-acoes, .bn-teste, .bn-abas{ display: none; } }

/* ---- a escolha saída × carga (parte 01b) */
.escolha{ margin: 22px 0; padding: 16px; border: 1.5px solid var(--tinta); border-radius: 12px; background: var(--caixa); }
.escolha button{
  font: 700 13px/1.2 var(--mono); padding: 8px 12px; min-height: 40px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--linha-forte); background: transparent; color: var(--tinta); touch-action: manipulation;
}
.escolha button:hover{ border-color: var(--tinta); }
.escolha button[aria-pressed="true"]{ background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.escolha .linha-escolha{ display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.escolha .veredito{ margin: 4px 0 0; padding: 12px 14px; border-left: 4px solid var(--linha-forte); background: var(--papel); }
.escolha .veredito b{ display: block; font: 700 14px/1.4 var(--mono); margin-bottom: 4px; }
.escolha .veredito.ok{ border-left-color: var(--verde); }
.escolha .veredito.ok b{ color: var(--verde); }
.escolha .veredito.nao{ border-left-color: var(--vermelho); }
.escolha .veredito.nao b{ color: var(--vermelho); }
.escolha .veredito p{ margin: 0; }
