.net-viz { min-height: 0; display: block; }
.net-frame {
  --net-ink: #1e2d47;
  --net-border: #72839e;
  --net-gold: #f2c961;
  --net-mist: #d8e1ef;
  width: 100%;
  min-width: 0;
  color: #fff;
  container: network / inline-size;
}
.net-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 14px; }
.net-toolbar label, .net-backup { display: grid; gap: 4px; font-size: .875rem; line-height: 1.3; }
.net-toolbar select, .net-backup select {
  color-scheme: dark;
  background: #203150; border: 1px solid #93a5be; color: #fff;
  padding: 6px 8px; border-radius: 5px; min-height: 44px; font: inherit;
  width: auto; max-width: 100%;
}
.net-toolbar .net-next {
  color: #152941; background: var(--net-gold); border: 1px solid transparent;
  border-radius: 5px; min-height: 44px; padding: 8px 14px; font: inherit;
  font-size: .92rem; font-weight: 650; cursor: pointer;
}
.net-toolbar .net-next:hover:not(:disabled) { background: #ffdd8d; }
.net-toolbar .net-next:disabled { color: #d6e0f0; background: #354967; border-color: #72839e; cursor: default; }
.net-field {
  margin-top: 14px; isolation: isolate; position: relative; height: 218px;
  border: 1px solid #546782; border-radius: 7px; background: var(--net-ink);
}
.net-field .net-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.net-wire { stroke: var(--net-border); stroke-width: 1.6px; }
.net-traversed { stroke: #e5bd65; }
.net-added { stroke-dasharray: 6 4; stroke: #99e0d4; stroke-width: 2.2px; }
.net-wave { stroke-width: 2.8px; animation: net-light .45s ease-out; }
@keyframes net-light { from { opacity: .35; } to { opacity: 1; } }
.net-vertical { display: none; }
.net-node {
  position: absolute; display: grid; justify-items: center; align-content: start;
  left: var(--net-x); top: var(--net-y); transform: translate(-50%, -13px);
  min-width: 44px; min-height: 44px; padding: 0; margin: 0; border: 0; border-radius: 4px;
  background: transparent; font: inherit; color: #f1f4f9; cursor: pointer; line-height: 1.2;
}
.net-node b {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #b8c7db; background: var(--net-ink); color: #d4dded; font-size: 17px;
}
.net-node small {
  margin-top: 3px; padding: 0 3px; width: max-content; border-radius: 3px;
  background: var(--net-ink); font: 600 .81rem/1.3 var(--sans,sans-serif);
}
.net-node.is-reached b { color: #192940; background: #f7da87; border-color: #f7da87; }
.net-node.is-seed b { outline: 1px solid var(--net-gold); outline-offset: 3px; font-size: 13px; }
.net-node:hover b { box-shadow: 0 0 0 4px #f5f5ff33; }
.net-node.is-new b { animation: net-arrive .38s ease-out; }
@keyframes net-arrive { from { transform: scale(.77); } to { transform: scale(1); } }
.net-readout { padding: 12px 0 15px; }
.net-readout strong { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: #ffe19c; line-height: 1.35; }
.net-readout p, .net-extras p { margin: 4px 0 0; font-size: .87rem; line-height: 1.5; color: #e0e6ef; }
.net-controls { width: 100%; padding-top: 0; }
.net-extras { width: 100%; min-width: 0; }
.net-extras details { padding: 0 0 9px; border-bottom: 1px solid #677993; }
.net-extras summary { width: fit-content; min-height: 44px; padding: 13px 2px 3px; color: #fff; cursor: pointer; font-weight: 650; font-size: .94rem; }
.net-extras details[open] { padding-bottom: 13px; }
.net-extras details p { margin: 8px 0 0; }
.net-choices { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 5px; }
.net-check { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.net-check input { width: 18px; height: 18px; accent-color: #f3cc70; flex-shrink: 0; }
.net-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 18px; margin-top: 4px; font-size: .88rem; }
.net-foot .net-reset, .net-foot a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; border: none; border-radius: 0;
  color: #fff; font: inherit; background: none; text-decoration: underline; text-underline-offset: 3px;
}
.net-foot a { color: #ffdc86; }
.net-foot i { display: inline-block; margin-left: 4px; font-style: normal; }
.net-frame :focus-visible, .net-extras :focus-visible { outline: 3px solid #ffe39b; outline-offset: 3px; }
@container network (max-width: 475px) {
  .net-vertical { display: inline; }
  .net-horizontal { display: none; }
  .net-field { height: 300px; }
  .net-node { left: var(--net-mx); top: var(--net-my); }
  .net-toolbar { gap: 7px 10px; }
  .net-toolbar .net-next { padding-inline: 10px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .net-wave, .net-node.is-new b { animation: none; }
}
