/* Ragtime responsive, linked circuit diagrams — no external JS or runtime dependencies */
.ragtime-diagram {
  color: #223047; background: #f8fafc; border: 1px solid #cad5e2;
  border-radius: 12px; padding: 1.1rem; margin: 1.2rem 0 1.5rem;
  max-width: 100%; box-sizing: border-box;
}
.ragtime-diagram * { box-sizing: border-box; }
.ragtime-diagram a { color: #194a7a; text-decoration: underline; text-underline-offset: 2px; }
.ragtime-diagram a:hover, .ragtime-diagram a:focus { color: #0d3456; }
.ragtime-diagram__heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: 1rem; }
.ragtime-diagram__heading strong { font-size: 1.05rem; }
.ragtime-diagram__heading small { color: #56657b; font-size: .82rem; }
.ragtime-diagram__node {
  border: 1px solid #adc3d6; border-radius: 8px; background: white; padding: .7rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center;
  width: min(100%, 440px); margin: 0 auto; line-height: 1.45;
}
.ragtime-diagram__kicker { color: #56657b; font-size: .77rem; font-weight: 600; letter-spacing: .02em; }
.ragtime-diagram__board { border-color: #507c9c; background: #e6f1f8; }
.ragtime-diagram__wire {
  min-height: 98px; width: fit-content; margin: 0 auto; padding: 10px 13px 13px 18px;
  border-left: 3px solid #6d879f; display: flex; flex-direction: column;
  gap: .12rem; position: relative; background: transparent;
  font-size: .83rem; line-height: 1.4;
}
.ragtime-diagram__wire:after {
  content: ""; position: absolute; bottom: 0; left: -7px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 8px solid #6d879f;
}
.ragtime-diagram__branches {
  margin-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem; position: relative;
}
.ragtime-diagram__branches:before {
  content:""; position: absolute; left: 12.5%; right: 12.5%; top: -18px;
  border-top: 2px solid #95aabe;
}
.ragtime-diagram__branch {
  min-width: 0; border: 1px solid #bdcddd; border-radius: 8px;
  padding: .75rem .55rem; background: white; display:flex;
  flex-direction:column; align-items:center; gap:.3rem; text-align:center;
  font-size: .86rem; line-height:1.4; position:relative;
}
.ragtime-diagram__branch:before {
  content:""; position:absolute; height:18px; top:-19px; left:50%; border-left:2px solid #95aabe;
}
.ragtime-diagram__circuit { font-size:.8rem; }
.ragtime-diagram__load {
  border-top: 1px solid #e4ebf2; margin-top:.25rem; padding-top:.5rem; width:100%; font-size:.82rem;
}
.ragtime-diagram__branch--unknown { border-style:dashed; background: #f2f4f7; color: #546275; }
.ragtime-diagram__load--unknown { color:#697588; }
.ragtime-diagram__note { font-size:.79rem; color:#52617a; margin: .85rem 0 0; line-height:1.5; }
@media (max-width: 780px) {
  .ragtime-diagram__branches { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 1.1rem; }
  .ragtime-diagram__branches:before { display:none; }
  .ragtime-diagram__branch:before { display:none; }
}
@media (max-width: 390px) {
  .ragtime-diagram__branches {grid-template-columns: 1fr;}
}

/* Signal paths are reciprocal: connectors show topology, not transmission direction. */
.ragtime-rf__antenna { background: #f0f7fe; border-color: #7296b7; }
.ragtime-rf__feeder {
  display: flex; flex-direction: column; text-align: center; align-items: center;
  gap: .2rem; width: min(100%, 440px); margin: 0 auto;
  padding: 10px 12px 12px; border-left: 3px solid #6d879f;
  border-right: 3px solid #6d879f; font-size: .84rem; line-height: 1.45;
  background: #f1f5fa;
}
.ragtime-rf__feeder strong { color: #263e5a; }
.ragtime-rf__connector { color: #4a607a; font-size: .8rem; }
.ragtime-rf__branches {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .75rem; margin-top: 28px; position: relative;
}
.ragtime-rf__branches:before {
  content:""; position:absolute; top:-18px; left:25%; right:25%;
  border-top: 2px solid #95aabe;
}
.ragtime-rf__branch {
  background: white; border: 1px solid #bdcddd; border-radius: 8px;
  padding: .8rem .7rem; min-width: 0; display:flex; flex-direction:column;
  align-items:center; text-align:center; gap: .35rem; position:relative;
  font-size: .86rem; line-height: 1.4;
}
.ragtime-rf__branch:before {
  content:""; height:18px; position:absolute; top:-19px; left:50%;
  border-left:2px solid #95aabe;
}
.ragtime-rf__port { color: #5a6b80; font-size: .78rem; }
@media (max-width: 390px) {
  .ragtime-rf__branches { grid-template-columns: 1fr; gap: .5rem; margin-top: 12px; }
  .ragtime-rf__branches:before, .ragtime-rf__branch:before { display:none; }
}


/* Linked NAV LTS branch diagrams: two columns on medium widths, one on narrow screens. */
.ragtime-nav__trunk {height:26px; border-left:3px solid #7791ac; width:0; margin:0 auto; }
.ragtime-nav__branches {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:.8rem; row-gap:.8rem;}
.ragtime-nav__branch {background:#fff; border:1px solid #b9cadb; border-radius:8px; padding:.85rem .7rem; display:flex; flex-direction:column; gap:.45rem; text-align:center; align-items:center; min-width:0; line-height:1.4; font-size:.84rem;}
.ragtime-nav__breaker {display:block; border:1px solid #a8bfd5; border-radius:6px; padding:.35rem .8rem; background:#e6f1f8; width:100%; }
.ragtime-nav__circuit {font-size:.79rem;}
.ragtime-nav__device {border-top:1px solid #dfe7f0; width:100%; padding:.5rem .15rem .1rem;}
.ragtime-nav__switch {background:#f3f6f9; border:1px solid #d9e2eb; border-radius:6px; padding:.5rem;}
.ragtime-nav__branch small {font-size:.76rem; color:#59677b;}
@media(max-width:540px){.ragtime-nav__branches{grid-template-columns:minmax(0,1fr);}}

/* House-bank source diagram: five independent functional outputs, monitored common negative. */
.ragtime-house__down {height:25px; border-left:3px solid #718da9; width:0; margin:0 auto;}
.ragtime-house__branches {display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.55rem; margin-top:28px; position:relative;}
.ragtime-house__branches:before {content:""; position:absolute; left:10%; right:10%; top:-18px; border-top:2px solid #8a9caf;}
.ragtime-house__branch {display:flex; flex-direction:column; align-items:center; gap:.4rem; text-align:center; position:relative; min-width:0; padding:.7rem .4rem; border:1px solid #c1cfdd; background:white; border-radius:8px; font-size:.82rem; line-height:1.45;}
.ragtime-house__branch:before {content:""; position:absolute; left:50%; top:-19px; height:18px; border-left:2px solid #8a9caf;}
.ragtime-house__branch small {font-size:.73rem; color:#53667b;}
.ragtime-house__switch {background:#e7eff9; border:1px solid #b0c3d7; padding:.4rem .25rem; border-radius:5px; width:100%; font-size:.75rem;}
.ragtime-house__fuse {margin-top:auto; padding-top:.45rem; font-size:.72rem; color:#6d6070;}
.ragtime-house__negative {margin-top:1rem; border:1px dashed #9daec0; border-radius:8px; background:#f2f5fa; padding:.7rem .95rem; font-size:.85rem; line-height:1.5;}
.ragtime-house__negative h4 {font-size:.9rem; margin:0 0 .3rem;}
.ragtime-house__negative p {margin:.3rem 0; }
.ragtime-house__negative small {color:#53677b; }
@media(max-width:920px){.ragtime-house__branches {grid-template-columns:repeat(3,minmax(0,1fr));}.ragtime-house__branch:before,.ragtime-house__branches:before {display:none;}}
@media(max-width:520px){.ragtime-house__branches {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:350px){.ragtime-house__branches {grid-template-columns:minmax(0,1fr);}}

/* Explicit 3+2 topology: three always-live branches, one switch feeding two distinct downstream circuits. */
.ragtime-house__groups {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.8rem;margin-top:.5rem;align-items:stretch;}
.ragtime-house__group {border:1px solid #c1cfdd;background:#f8fafc;border-radius:9px;padding:.8rem;min-width:0;}
.ragtime-house__group-heading {text-align:center;display:flex;flex-direction:column;gap:.15rem;padding-bottom:.65rem;}
.ragtime-house__group-heading small {color:#53677b;font-size:.76rem;}
.ragtime-house__group-branches {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;}
.ragtime-house__group-switched .ragtime-house__group-branches {grid-template-columns:repeat(3,minmax(0,1fr));}
.ragtime-house__groups .ragtime-house__branch {font-size:.78rem;padding:.55rem .35rem;}
.ragtime-house__shared-switch {margin:.25rem 0;display:flex;flex-direction:column;gap:.3rem;text-align:center;border:2px solid #809bb7;border-radius:7px;background:#e7eff9;padding:.6rem .4rem;line-height:1.4;font-size:.8rem;}
.ragtime-house__shared-switch small {color:#53677b;font-size:.74rem;}
.ragtime-house__group .ragtime-house__down {height:15px;}
.ragtime-house__groups .ragtime-house__branch:before {display:none;}
@media(max-width:760px){.ragtime-house__groups {grid-template-columns:minmax(0,1fr);}.ragtime-house__group-branches,.ragtime-house__group-switched .ragtime-house__group-branches {grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:440px){.ragtime-house__group-branches {grid-template-columns:minmax(0,1fr);}.ragtime-house__group-switched .ragtime-house__group-branches {grid-template-columns:minmax(0,1fr);}}
