:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #172a32;
  background: #f5f7f6;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 82px;
  border-bottom: 1px solid #dce4df;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}
@font-face {
  font-family: "Bakbak One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bakbak-one-latin.woff2") format("woff2");
}
.brand {
  text-decoration: none;
  color: inherit;
  font-family: "Bakbak One", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark {
  background: #163f35;
  color: #c3f99e;
  border-radius: 9px;
  padding: 2px 10px;
}
.private {
  font-size: 12px;
  color: #3c6b53;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 44px 5vw 24px;
}
.workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
}
.sidebar {
  align-self: start;
}
aside {
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 12px;
  padding: 20px;
}
#example-credit,
#example-routing {
  margin: 12px 2px 0;
}
button,
input,
a {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #cbd8cf;
  border-radius: 6px;
  padding: 11px;
  color: inherit;
  background: white;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.text-button {
  border: 0;
  width: 100%;
  font-size: 12px;
  color: #386544;
  margin: 5px 0 14px;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0;
}
.hint {
  color: #778079;
  font-size: 11px;
  line-height: 1.6;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
label {
  font-size: 11px;
  font-weight: 600;
}
label span {
  font-weight: 400;
  color: #778079;
}
input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: #f8faf8;
  border: 1px solid #dce3dd;
  border-radius: 5px;
  padding: 9px;
  font-size: 13px;
}
.primary {
  width: 100%;
  background: #183f33;
  color: #defacb;
  border-color: #183f33;
  font-size: 13px;
}
#cancel {
  margin-top: 8px;
  width: 100%;
}
details {
  font-size: 11px;
  line-height: 1.7;
  color: #6b786e;
  margin-top: 18px;
}
summary {
  cursor: pointer;
}
.viewer {
  border: 1px solid #d2ddd6;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #101c25;
  min-height: 610px;
}
.viewer-head,
.viewer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9aabae;
  padding: 17px 20px;
  font-size: 10px;
  letter-spacing: 0.5px;
  background: #15232c;
  gap: 12px;
}
#filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65%;
}
#badge {
  color: #add3b5;
  white-space: nowrap;
}
.head-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
#metrics {
  color: #cfdcd4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#metrics[hidden] {
  display: none;
}
#preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 25px;
}
#preview svg {
  width: 100%;
  max-height: 570px;
}
.empty {
  text-align: center;
  color: #a3b5b7;
}
.empty h2 {
  font-size: 18px;
  color: #d9e4e0;
  margin-top: 22px;
}
.empty p {
  font-size: 12px;
  max-width: 260px;
  line-height: 1.8;
  margin: auto;
}
.board-icon {
  font-size: 80px;
  font-weight: 200;
  color: #3d625c;
}
.viewer-foot {
  font-size: 9px;
  flex-wrap: wrap;
}
.viewer-foot i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 0 4px 0 12px;
}
.pads {
  background: #edcf86;
}
.result {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  align-items: center;
}
#status:empty {
  display: none;
}
#status {
  font-size: 13px;
}
.downloads {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.downloads a {
  border: 1px solid #b4c6b7;
  padding: 11px;
  border-radius: 6px;
  font-size: 12px;
  color: #164333;
  text-decoration: none;
  background: white;
}
[hidden] {
  display: none !important;
}
footer {
  border-top: 1px solid #dce4df;
  padding-top: 22px;
  font-size: 11px;
  color: #78877d;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
footer details {
  margin: 0;
  max-width: 760px;
}
footer p {
  margin: 10px 0 0;
}
.foot-links {
  flex-shrink: 0;
}
.foot-links a {
  color: #386544;
}
.warn {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: #8a6419;
}
:focus-visible {
  outline: 3px solid #84b66b;
  outline-offset: 3px;
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .viewer {
    min-height: 430px;
  }
  .result {
    align-items: flex-start;
    flex-direction: column;
  }
  .private {
    display: none;
  }
  header {
    padding: 0 5vw;
  }
  footer {
    flex-direction: column;
    gap: 12px;
  }
  #preview {
    min-height: 330px;
  }
  main {
    padding-top: 25px;
  }
}
.project-label {
  display: block;
}
.project-label input {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 11px;
}
.zone-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
input:disabled {
  opacity: 0.5;
}
.panel {
  border: 1px solid #dce4df;
  border-radius: 6px;
  margin: 4px 0 10px;
  background: #fff;
}
.panel > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #386544;
  list-style: none;
  padding: 9px 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel > summary > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel > summary::-webkit-details-marker {
  display: none;
}
.panel > summary::before {
  content: "›";
  font-size: 15px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.panel[open] > summary::before {
  transform: rotate(90deg);
}
.panel > summary:hover {
  background: #eef3ef;
}
.panel > summary:focus-visible {
  outline: 2px solid #386544;
  outline-offset: -2px;
}
.panel > *:not(summary) {
  margin-left: 10px;
  margin-right: 10px;
}
.panel[open] > summary {
  border-bottom: 1px solid #eef1ee;
  border-radius: 5px 5px 0 0;
  margin-bottom: 8px;
}
.panel .zone-option {
  margin-bottom: 8px;
}
.board-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.board-picker .text-button {
  width: auto;
  margin: 0;
  white-space: nowrap;
  border: 1px solid #dce4df;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 11px;
  background: #fff;
}
.board-picker .text-button:hover {
  background: #eef3ef;
}
#examples {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding: 6px 4px 6px 8px;
  font-size: 12px;
}
.board-links {
  display: flex;
  gap: 12px;
  margin: 0 0 12px;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  color: #386544;
  text-decoration: underline;
  cursor: pointer;
}
.drop-hint {
  position: absolute;
  inset: 34px 0 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  background: rgba(16, 28, 37, 0.82);
  color: #e7eee9;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.drop-hint p {
  margin: 0;
  font-size: 14px;
  max-width: 22em;
  line-height: 1.5;
}
.drop-icon {
  width: 52px;
  height: 52px;
  opacity: 0.85;
}
.drop-hint[hidden] {
  display: none;
}
.drop-hint.leaving {
  opacity: 0;
}
.net-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.net-controls .text-button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}
#net-filter {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #dce4df;
  border-radius: 4px;
}
#net-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 190px;
  overflow-y: auto;
}
#net-list label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 2px 0;
  font-size: 12px;
}
#net-list span {
  overflow-wrap: anywhere;
}
#net-list em {
  margin-left: auto;
  padding-left: 8px;
  color: #778079;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}
#project-name {
  overflow-wrap: anywhere;
}

.viewer {
  position: relative;
  cursor: pointer;
}
.viewer.drag {
  outline: 3px solid #a9e58b;
  outline-offset: 3px;
}
.viewer.drag::after {
  content: "Drop PCB + optional project to load";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #12332ddd;
  color: #defacb;
  font-size: 18px;
  pointer-events: none;
}

select {
  width: 100%;
  padding: 9px;
  margin-top: 8px;
  border: 1px solid #dce3dd;
  border-radius: 5px;
  background: #f8faf8;
  color: inherit;
  font: inherit;
}
#example-credit a {
  color: #386544;
}

#layer-legend { display: flex; flex-wrap: wrap; gap: 10px; }

.install {
  margin-top: 4px;
}
.install h2 {
  margin-bottom: 6px;
}
.install-lede {
  margin: 0 0 14px;
  color: #66756e;
  font-size: 13px;
  max-width: 62ch;
}
.terminal {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #21323c;
  box-shadow: 0 10px 24px rgba(16, 28, 37, 0.12);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #15232c;
}
.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #33454f;
}
.terminal-bar .dot:first-child {
  background: #e06c62;
}
.terminal-bar .dot:nth-child(2) {
  background: #e0b341;
}
.terminal-bar .dot:nth-child(3) {
  background: #62b45f;
}
.terminal-title {
  margin-left: 8px;
  color: #7e929a;
  font-size: 11px;
  letter-spacing: 0.4px;
}
.terminal-body {
  margin: 0;
  padding: 16px 18px;
  background: #101c25;
  color: #dbe7e0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.85;
  overflow-x: auto;
}
.terminal-body .prompt {
  color: #7fc98a;
  user-select: none;
  margin-right: 6px;
}
.terminal-body .comment {
  color: #6f8189;
}
.install code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: #eaeee9;
  border-radius: 4px;
  padding: 1px 5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2c4a37;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cfdcd2;
  border-radius: 6px;
  padding: 6px 11px;
  background: #fff;
}
.repo-link:hover {
  background: #eef3ef;
  border-color: #b4c6b7;
}
