:root {
  --ink: #253b42;
  --muted: #6d7e83;
  --line: #dce3e3;
  --paper: #fff;
  --wash: #f3f6f5;
  --green: #137969;
  --green-soft: #e8f4ee;
  --navy: #172b32;
  --orange: #be6722;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font: 13px var(--sans);
  color: var(--ink);
  background: var(--wash);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 7px 11px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button:hover,
.button:hover {
  background: var(--wash);
  border-color: #a8b9b8;
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #43a99b;
  outline-offset: 3px;
}
input,
select {
  min-height: 36px;
  width: 100%;
  border: 1px solid #cdd8d7;
  border-radius: 5px;
  padding: 8px 9px;
  color: var(--ink);
  background: white;
}
input[type="radio"] {
  min-height: auto;
  width: auto;
  accent-color: var(--green);
}
input[type="checkbox"] {
  width: auto;
}
button.primary,
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
button.primary:hover {
  background: #0b6154;
}
button.danger {
  color: #af3b35;
}
a {
  color: var(--green);
}
kbd {
  font: 10px var(--mono);
  opacity: 0.55;
  padding-left: 5px;
}
.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-height: 550px;
}
.topbar {
  height: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--navy);
  color: #ecf3f1;
  padding: 0 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.brand strong {
  font-size: 20px;
  letter-spacing: -0.7px;
}
.brand strong span {
  font-weight: 400;
  color: #9fc4b9;
}
.edition {
  font: 9px var(--mono);
  letter-spacing: 1.4px;
  margin-left: 3px;
  color: #a8beba;
}
.topbar button {
  background: transparent;
  border-color: transparent;
  color: #e5eeec;
}
.topbar button:hover {
  background: #294149;
}
.topbar .save-button {
  border-color: #536768;
}
.file-actions {
  display: flex;
  gap: 4px;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
}
.topbar-right button {
  border-color: #526b6d;
}
.connection-summary {
  color: #a5bab7;
  font: 11px var(--mono);
}
.projectbar {
  height: 78px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.project-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.eyebrow {
  font: 10px var(--mono);
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.project-heading input {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.7px;
  max-width: 360px;
  width: 26vw;
  border-color: transparent;
  padding: 6px;
}
.project-heading input:hover {
  border-color: var(--line);
}
#save-state {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.run-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.run-controls > span {
  font: 10px var(--mono);
  letter-spacing: 1px;
  margin-right: 14px;
  white-space: nowrap;
}
.run-controls i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #96a4a6;
  margin-right: 6px;
}
.run-controls .running {
  color: var(--green);
}
.running i {
  background: var(--green);
}
.workbench {
  flex: 1;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 270px;
  min-height: 0;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #f9fbfa;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.sidebar-section {
  padding: 23px 15px;
  border-bottom: 1px solid var(--line);
}
.sidebar-section > .eyebrow {
  display: block;
  margin: 0 0 14px 6px;
}
.file-row {
  width: 100%;
  border: 0;
  justify-content: flex-start;
  text-align: left;
  gap: 11px;
  padding: 10px 8px;
  background: transparent;
  margin: 3px 0;
  white-space: normal;
}
.file-row.active {
  background: #e8eeeb;
}
.file-row small {
  display: block;
  font: 10px var(--mono);
  color: var(--muted);
  margin-top: 5px;
}
.file-icon {
  font: 11px var(--mono);
  width: 26px;
  height: 28px;
  border: 1px solid #bdceca;
  display: grid;
  place-items: center;
  color: var(--green);
  background: white;
  border-radius: 3px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}
.subtle {
  color: var(--muted);
  font-size: 11px;
}
.library-tool {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  border: 1px solid transparent;
  background: transparent;
  gap: 12px;
  margin: 2px 0;
  min-height: 44px;
  cursor: grab;
}
.library-symbol {
  font: 17px var(--mono);
  color: var(--green);
  width: 52px;
  flex-shrink: 0;
}
.library-tool:hover {
  background: #fff;
  border-color: var(--line);
}
.library-tool:active {
  cursor: grabbing;
}
.sidebar-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 17px 6px 0;
}
.sidebar-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 20px;
  font-size: 11px;
  line-height: 1.5;
}
.sidebar-footer small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.workspace-tabs {
  display: flex;
  align-items: stretch;
  height: 49px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  padding: 0 16px;
  gap: 8px;
}
.workspace-tabs > button {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
  padding: 0 12px;
}
.workspace-tabs > button.active {
  color: var(--green);
  border-bottom: 2px solid var(--green);
  font-weight: 600;
}
.history-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}
.history-controls button {
  border: 0;
  font-size: 20px;
  width: 31px;
  min-height: 29px;
  padding: 0;
}
.workspace-content {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
}
.ladder-pane,
.plant-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1;
}
.workspace-content[data-view="ladder"] .plant-pane,
.workspace-content[data-view="plant"] .ladder-pane {
  display: none;
}
.workspace-content[data-view="split"] {
  flex-direction: column;
}
.workspace-content[data-view="split"] .ladder-pane {
  flex: 1.1;
}
.workspace-content[data-view="split"] .plant-pane {
  border-top: 1px solid var(--line);
}
.canvas-toolbar {
  height: 55px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 23px;
  border-bottom: 1px solid var(--line);
  background: #fafcfb;
}
.canvas-toolbar strong {
  font-size: 12px;
  font-weight: 600;
}
.canvas-toolbar select {
  width: auto;
  max-width: 170px;
}
.document-number {
  font: 10px var(--mono);
  margin-right: 12px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  padding-right: 12px;
}
.ladder-sheet {
  flex: 1;
  overflow: auto;
  padding: 29px 29px 45px;
  background-color: #fafcfb;
  background-image: radial-gradient(#d9e2e0 0.7px, transparent 0.7px);
  background-size: 16px 16px;
}
.sheet-heading {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  letter-spacing: 1.6px;
  color: #7c918f;
  margin-bottom: 25px;
  min-width: 460px;
}
.rung-block {
  border: 1px solid var(--line);
  border-left: 3px solid #c4d4ce;
  background: #ffffffed;
  margin-bottom: 21px;
  border-radius: 4px;
  min-width: 480px;
  position: relative;
}
.rung-block.selected {
  border-left-color: var(--green);
  box-shadow: 0 2px 6px #133b2906;
}
.rung-header {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background: #f7f9f8;
  border-bottom: 1px solid #eaf0ed;
  gap: 12px;
}
.rung-number {
  font: 10px var(--mono);
  color: var(--green);
  white-space: nowrap;
}
.rung-comment {
  font-size: 12px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.rung-header button {
  border: 0;
  background: transparent;
  min-height: 24px;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--muted);
}
.circuit {
  padding: 22px 18px 21px;
  overflow: auto;
}
.rung-line {
  display: flex;
  align-items: center;
  min-height: 105px;
  border-left: 3px solid #829e97;
  border-right: 3px solid #829e97;
  width: max-content;
  min-width: 100%;
  position: relative;
}
.rung-line:before {
  content: "";
  height: 2px;
  background: #91a8a2;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
}
.ladder-cell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  min-width: 94px;
  max-width: 135px;
  min-height: 88px;
  cursor: grab;
  flex-shrink: 0;
  padding: 8px;
}
.ladder-cell:hover {
  background: #f5faf7;
  border-color: #b9cfc7;
}
.ladder-cell.selected {
  border-color: var(--green);
  background: #edf7f1;
  box-shadow: 0 0 0 2px #13796912;
}
.cell-address {
  font: 10px var(--mono);
  color: #6e8280;
}
.cell-symbol {
  font: 25px var(--mono);
  line-height: 1.15;
  color: #395d54;
  white-space: pre;
}
.cell-tag {
  font: 10px var(--mono);
  color: #385c52;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-pin {
  font: 9px var(--mono);
  color: #82928d;
}
.ladder-cell.activo .cell-symbol {
  color: #078b5c;
}
.ladder-cell.activo:after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #078b5c;
}
.drop-slot {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 26px;
  height: 70px;
  border: 1px dashed transparent;
  border-radius: 4px;
  background: transparent;
  padding: 0;
  opacity: 1;
  color: #abc2b9;
  font: 20px var(--mono);
}
.drop-slot:hover,
.dragging .drop-slot {
  border-color: #9ac7b6;
  background: #ecf7f099;
}
.drop-slot.over {
  border: 2px solid var(--green);
  background: #d7f0e4;
}
.parallel-line {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 170px;
  border: 2px solid #91a8a2;
  border-top: 0;
  margin: 0 0 0 3px;
  padding: 7px 12px 0;
}
.parallel-line:before,
.parallel-line:after {
  content: "";
  position: absolute;
  top: -52px;
  height: 52px;
  width: 2px;
  background: #91a8a2;
}
.parallel-line:before {
  left: -2px;
}
.parallel-line:after {
  right: -2px;
}
.parallel-line .ladder-cell {
  min-height: 78px;
}
.parallel-caption {
  font: 9px var(--mono);
  color: var(--muted);
  margin-top: 12px;
}
.rung-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 14px;
  position: relative;
  background: #fff;
}
.add-rung-bottom {
  width: 100%;
  min-width: 480px;
  min-height: 44px;
  border-style: dashed;
  background: #ffffff80;
  color: var(--muted);
  font-size: 12px;
}
.sheet-note {
  margin: 40px 0 0;
  line-height: 1.8;
  color: #82938f;
  font-size: 11px;
}
.sheet-note > span {
  float: left;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd8d2;
  border-radius: 4px;
  font: 11px var(--mono);
  margin: 3px 13px 15px 0;
}
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  font: 10px var(--mono);
  color: var(--muted);
  min-height: 34px;
}
.statusbar > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.statusbar #status-message {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.statusbar > span {
  white-space: nowrap;
}
.inspector {
  background: white;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.inspector-title {
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
#inspector-content {
  padding: 23px 20px;
  min-height: 285px;
}
.inspector h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 10px 0 7px;
}
.inspector p.hint {
  margin: 0 0 22px;
}
.inspector label,
dialog label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 500;
  gap: 7px;
  margin-bottom: 15px;
}
.inspector .large-symbol {
  font: 32px var(--mono);
  color: var(--green);
  padding: 10px 0;
}
.inspector input,
.inspector select {
  font-size: 12px;
}
.inspector .button-row {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.button-row button {
  flex: 1;
  font-size: 11px;
}
.pin-assignment {
  display: flex;
  justify-content: space-between;
  background: var(--wash);
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 10px var(--mono);
  margin: 14px 0;
}
.io-monitor {
  padding: 23px 20px;
  border-top: 1px solid var(--line);
}
.io-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 40px;
  border-bottom: 1px solid #eef2ef;
  font: 10px var(--mono);
}
.io-row small {
  display: block;
  font: 9px var(--mono);
  color: var(--muted);
  margin-top: 3px;
}
.io-value {
  min-height: 24px;
  padding: 3px 8px;
  font: 10px var(--mono);
  color: #6f8680;
  border-radius: 3px;
}
.io-value.on {
  background: #dff3e6;
  color: #117b50;
  border-color: #aad6b9;
}
.hint {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  width: min(480px, calc(100vw - 28px));
  max-height: 90dvh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 28px 110px #071c2d40;
}
dialog::backdrop {
  background: #142d3c65;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.dialog-heading h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 600;
  margin: 8px 0 0;
}
.dialog-heading > button {
  border: 0;
  background: var(--wash);
  font-size: 20px;
  min-width: 32px;
  padding: 3px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
fieldset {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 6px;
}
legend {
  font-size: 12px;
  color: var(--muted);
}
dialog .radio-option {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 13px;
  cursor: pointer;
}
.radio-option small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.wide-dialog {
  width: min(1000px, calc(100vw - 28px));
}
.board-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 30px;
}
.board-info {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding-right: 25px;
}
.board-info a {
  font-size: 12px;
}
.board-pcb {
  background: #1d685e;
  color: #c7e8dc;
  border: 1px solid #195248;
  border-radius: 8px;
  padding: 17px 12px;
  margin: 17px 0;
  position: relative;
}
.board-pcb h3 {
  font-size: 20px;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: 1px;
}
.board-pcb p {
  font: 10px var(--mono);
  opacity: 0.8;
}
.pin-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 16px;
}
.pin {
  font: 9px var(--mono);
  background: #12463f;
  color: #cae2d9;
  border: 1px solid #467f70;
  border-radius: 3px;
  padding: 6px 0;
  text-align: center;
}
.pin.used {
  background: #e6c573;
  color: #3e411c;
  border-color: #e6c573;
}
.pin.reserved {
  opacity: 0.45;
}
.board-chip {
  border: 2px solid #578478;
  margin: 18px auto 10px;
  padding: 12px;
  text-align: center;
  width: max-content;
  font: 10px var(--mono);
  background: #143b37;
}
.table-scroll {
  overflow: auto;
}
.mapping-area {
  min-width: 0;
}
.mapping-area table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.mapping-area th {
  text-align: left;
  font: 10px var(--mono);
  color: var(--muted);
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.mapping-area td {
  padding: 7px 4px;
  border-bottom: 1px solid #edf1ed;
}
.mapping-area input {
  min-width: 90px;
  font: 11px var(--mono);
  padding: 7px;
}
.mapping-area td:nth-child(2) input {
  min-width: 125px;
}
.mapping-area select {
  min-width: 80px;
  font: 11px var(--mono);
}
.mapping-area td button {
  border: 0;
  padding: 4px 8px;
}
.error {
  font-size: 12px;
  line-height: 1.5;
  color: #ab342b;
}
.hardware-dialog {
  width: min(660px, calc(100vw - 28px));
}
.connection-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 23px;
}
.connection-methods .radio-option {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin: 0;
  align-items: flex-start;
}
.connection-methods .radio-option:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}
.port-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 15px;
}
.port-row label {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.port-row button {
  height: 36px;
}
.connection-notice {
  padding: 14px 16px;
  border: 1px solid #d5e7dc;
  background: #f1f8f3;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 5px;
  margin: 18px 0;
}
details {
  font-size: 12px;
  line-height: 1.8;
}
summary {
  font-weight: 600;
  cursor: pointer;
}
details li {
  margin-bottom: 9px;
}
code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--wash);
  padding: 2px 5px;
}
#toast {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 13px 20px;
  border-radius: 6px;
  box-shadow: 0 5px 30px #0002;
  font-size: 12px;
  z-index: 20;
  max-width: 90vw;
}
#toast[hidden] {
  display: none;
}
.recent-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  white-space: normal;
  margin: 8px 0;
  text-align: left;
}
.recent-item small {
  color: var(--muted);
  font-size: 10px;
}
.plant-viewport {
  flex: 1;
  overflow: auto;
  background: #eef3f1;
}
.plant-viewport #plant-stage {
  position: relative;
  min-width: 700px;
  min-height: 650px;
  height: 100%;
  background-image: radial-gradient(#bdcfca 1px, transparent 1px);
  background-size: 20px 20px;
  background-repeat: repeat;
}
.plant-object {
  position: absolute;
  width: 170px;
  border: 1px solid #c9d8d2;
  border-radius: 7px;
  background: white;
  box-shadow: 0 4px 12px #163b2d08;
  overflow: hidden;
}
.plant-object.selected {
  border-color: var(--green);
}
.plant-object header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
  padding: 6px 10px;
  font: 10px var(--mono);
  cursor: grab;
  touch-action: none;
}
.plant-object header button {
  min-height: 23px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.plant-object header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plant-body {
  display: grid;
  place-items: center;
  min-height: 105px;
  padding: 15px;
}
.plant-body svg {
  width: 95px;
  height: 95px;
}
.motor-rotor {
  transform-origin: center;
  transform-box: fill-box;
}
.animacion-girar {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.plant-object footer {
  text-align: center;
  font: 10px var(--mono);
  padding: 7px;
  border-top: 1px solid #eef2ef;
  color: var(--muted);
}
.plant-push {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  background: #337d68;
  color: white;
  box-shadow: 0 0 0 5px #e5ece8;
  border: 3px solid #296b57;
}
.plant-push.pressed {
  background: #174b3e;
  transform: scale(0.95);
}
.plant-lamp {
  width: 46px;
  height: 46px;
  border: 5px solid #dbe8e1;
  border-radius: 50%;
  background: #adbbb4;
}
.plant-lamp.on {
  background: #50b785;
  box-shadow: 0 0 25px #3eaf7140;
}
.plant-conveyor {
  width: 135px;
  height: 45px;
  border: 5px solid #6c8880;
  border-radius: 20px;
  background: repeating-linear-gradient(
    90deg,
    #d0ded7 0 10px,
    #8da69c 10px 12px
  );
}
.plant-conveyor.on {
  animation: belt 0.5s linear infinite;
}
@keyframes belt {
  to {
    background-position: 24px 0;
  }
}
.plant-label {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
}
.empty-state {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
  border: 1px dashed var(--line);
  background: #fff;
}
.empty-state h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
}
.inspector .full-width {
  width: 100%;
  margin-top: 12px;
}
@media (min-width: 1600px) {
  .workbench {
    grid-template-columns: 235px minmax(0, 1fr) 290px;
  }
  .ladder-sheet {
    padding: 35px 50px;
  }
  .workspace-content[data-view="split"] {
    flex-direction: row;
  }
  .workspace-content[data-view="split"] .plant-pane {
    border-left: 1px solid var(--line);
    border-top: 0;
  }
}
@media (max-width: 1150px) {
  .workbench {
    grid-template-columns: 180px minmax(0, 1fr) 235px;
  }
  .sidebar-section {
    padding: 20px 10px;
  }
  .library-tool {
    gap: 4px;
    padding: 6px;
  }
  .library-symbol {
    width: 48px;
  }
  .edition,
  .connection-summary,
  .project-heading > .eyebrow {
    display: none;
  }
  .topbar {
    gap: 20px;
  }
  .ladder-sheet {
    padding: 23px 16px;
  }
  .canvas-toolbar {
    padding: 0 16px;
  }
  .canvas-toolbar .subtle {
    display: none;
  }
  .project-heading input {
    width: 28vw;
  }
  .projectbar {
    padding: 0 20px;
  }
  #inspector-content,
  .io-monitor {
    padding: 20px 15px;
  }
  .sidebar-hint {
    font-size: 10px;
  }
  .workspace-tabs {
    padding: 0 8px;
    gap: 0;
  }
  .workspace-tabs > button {
    padding: 0 9px;
    font-size: 11px;
  }
  .statusbar > span:last-child {
    display: none;
  }
}
@media (max-width: 900px) {
  .workbench {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .inspector {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
  }
  .inspector-title {
    display: none;
  }
  #inspector-content {
    min-height: 0;
  }
  .app {
    height: auto;
    min-height: 100dvh;
  }
  .workbench {
    min-height: calc(100dvh - 130px);
  }
  .workspace {
    min-height: 580px;
  }
  .sidebar {
    overflow: visible;
  }
  .workspace-content {
    min-height: 420px;
    max-height: 700px;
  }
  .io-monitor {
    border-left: 1px solid var(--line);
    border-top: 0;
  }
  .library-tool {
    font-size: 11px;
  }
  .library-symbol {
    font-size: 16px;
    width: 42px;
  }
  .section-title .subtle {
    display: none;
  }
  .project-heading {
    gap: 8px;
  }
  .project-heading input {
    width: 32vw;
    font-size: 18px;
  }
  .run-controls > span {
    margin-right: 0;
  }
  .topbar {
    padding: 0 15px;
    gap: 15px;
  }
  .brand strong {
    font-size: 18px;
  }
  .topbar-right {
    gap: 0;
  }
  .file-actions {
    gap: 0;
  }
  .file-actions kbd {
    display: none;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: auto;
    min-height: 99px;
    flex-wrap: wrap;
    padding: 14px;
    gap: 10px;
  }
  .topbar .brand {
    flex: 1;
  }
  .topbar-right {
    order: 2;
  }
  .topbar-right button {
    font-size: 11px;
  }
  .file-actions {
    order: 3;
    width: 100%;
    border-top: 1px solid #354c52;
    padding-top: 8px;
  }
  .topbar button {
    min-height: 30px;
  }
  .projectbar {
    height: auto;
    min-height: 103px;
    padding: 13px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .project-heading {
    width: 100%;
  }
  .project-heading input {
    width: auto;
    flex: 1;
    max-width: 72%;
    font-size: 19px;
  }
  .project-heading #save-state {
    font-size: 10px;
  }
  .run-controls {
    width: 100%;
    justify-content: flex-end;
  }
  .run-controls > span {
    margin-right: auto;
  }
  .workbench {
    display: flex;
    flex-wrap: wrap;
  }
  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-section:first-child,
  .sidebar-footer,
  .sidebar-hint,
  .library-section > .section-title {
    display: none;
  }
  .library-section {
    padding: 8px;
    border: 0;
    overflow: auto;
  }
  #library {
    display: flex;
    gap: 5px;
    width: max-content;
  }
  .library-tool {
    width: auto;
    min-height: 40px;
    flex-direction: column;
    gap: 2px;
    padding: 4px 10px;
    font-size: 9px;
    border-color: var(--line);
    background: white;
  }
  .library-symbol {
    font-size: 17px;
    width: auto;
  }
  .workspace {
    width: 100%;
    min-height: 470px;
  }
  .workspace-tabs {
    height: 44px;
    padding: 0 8px;
  }
  .workspace-content {
    min-height: 360px;
    max-height: 600px;
  }
  .ladder-sheet {
    padding: 20px 12px;
  }
  .canvas-toolbar {
    padding: 0 12px;
    gap: 7px;
  }
  .canvas-toolbar .document-number {
    display: none;
  }
  .canvas-toolbar .button {
    font-size: 10px;
    padding: 5px;
  }
  .canvas-toolbar select {
    max-width: 135px;
    font-size: 11px;
  }
  .canvas-toolbar strong {
    font-size: 11px;
  }
  .inspector {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .io-monitor {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .inspector label {
    max-width: 100%;
  }
  .inspector .button-row {
    max-width: 100%;
  }
  .board-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .board-info {
    border-right: 0;
    padding: 0;
  }
  .board-pcb {
    max-width: 280px;
  }
  .wide-dialog,
  dialog {
    padding: 20px;
  }
  .dialog-heading h2 {
    font-size: 21px;
  }
  .connection-methods {
    grid-template-columns: 1fr;
  }
  .port-row {
    align-items: stretch;
    flex-direction: column;
  }
  .statusbar {
    padding: 9px 12px;
    font-size: 9px;
  }
  .sheet-note {
    max-width: 280px;
  }
  .history-controls {
    gap: 0;
  }
  .history-controls button {
    width: 25px;
  }
  .rung-block,
  .add-rung-bottom,
  .sheet-heading {
    min-width: 460px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
[hidden] {
  display: none !important;
}
.input-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  flex-shrink: 0;
  align-self: flex-start;
}
.branch-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 105px;
}
.branch-tail {
  min-width: 26px;
  flex: 1;
}
.branch-parallel {
  position: relative;
  margin-top: -52.5px;
  padding-top: 52.5px;
}
.branch-parallel:before,
.branch-parallel:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 52.5px;
  width: 2px;
  background: #91a8a2;
}
.branch-parallel:before {
  left: 0;
}
.branch-parallel:after {
  right: 0;
}
.branch-path {
  display: flex;
  align-items: center;
  position: relative;
  height: 105px;
}
.branch-path:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #91a8a2;
}
.has-parallel {
  align-items: flex-start;
}
.has-parallel:before {
  top: 52.5px;
}
.has-parallel > .ladder-cell {
  margin-top: 8.5px;
}
.has-parallel > .drop-slot {
  margin-top: 17.5px;
}
.has-parallel .branch-main > .ladder-cell {
  z-index: 3;
}
.has-parallel .branch-main > .drop-slot {
  z-index: 4;
}
