/* ==========================================================================
   board.css — PCB substrate, mounting holes, SVG copper bus, topbar & HUD,
               KiCad layers popover, and tactile hardware switches
   ========================================================================== */

.board {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(230, 194, 116, 0.14) 1px, transparent 1.2px),
    radial-gradient(var(--silk-rule) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 92, 69, 0.22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 92, 69, 0.22) 1px, transparent 1px),
    linear-gradient(135deg, rgba(22, 92, 69, 0.18) 1px, transparent 1px);
  background-size: 96px 96px, 24px 24px, 96px 96px, 96px 96px, 48px 48px;
  background-position: 12px 12px, 0 0, 0 0, 0 0, 0 0;
  border-inline: 3px solid var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--silk-rule);
}

/* Plated Through-Hole Corner Mounting Holes (M3) */
.mount {
  position: fixed;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--bg-deep) 0 42%, var(--gold) 44% 66%, transparent 68%),
    conic-gradient(from 0deg, var(--gold-hi), var(--gold), var(--gold-lo), var(--gold), var(--gold-hi));
  border: 1.5px solid var(--silk-faint);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7), 0 0 0 3px var(--bg);
  z-index: 45;
  pointer-events: none;
}

.m-tl {
  top: 14px;
  left: 14px;
}

.m-tr {
  top: 14px;
  right: 14px;
}

.m-bl {
  bottom: 14px;
  left: 14px;
}

.m-br {
  bottom: 14px;
  right: 14px;
}

@media (max-width: 900px) {
  .mount {
    display: none;
  }
}

/* SVG Copper Bus & Full-Board PCB Circuit Layer */
.bus {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.25s ease;
}

.bus-trace-under {
  fill: none;
  stroke: var(--trace-under);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bus-trace-sub {
  fill: none;
  stroke: var(--trace-under);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.bus-trace-copper {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.42;
}

.bus-trace-fine {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.26;
}

.bus-pulse {
  fill: none;
  stroke: var(--gold-hi);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 38 260;
  animation: busPulse 4.2s linear infinite;
  filter: drop-shadow(0 0 5px var(--gold));
}

.bus-pulse-alt {
  fill: none;
  stroke: var(--led-ok);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 26 280;
  animation: busPulse 3.4s linear infinite reverse;
  filter: drop-shadow(0 0 6px var(--led-ok));
}

.bus-pulse-cross {
  fill: none;
  stroke: var(--led-ok);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18 220;
  animation: busPulseCross 3.2s linear infinite;
  filter: drop-shadow(0 0 5px var(--led-ok));
  opacity: 0.85;
}

.bus-pulse-gold {
  fill: none;
  stroke: var(--gold-hi);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 22 240;
  animation: busPulseCross 3.8s linear infinite reverse;
  filter: drop-shadow(0 0 5px var(--gold));
  opacity: 0.85;
}

@keyframes busPulse {
  from {
    stroke-dashoffset: 298;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes busPulseCross {
  from {
    stroke-dashoffset: 262;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.bus-via-outer {
  fill: var(--gold);
  stroke: var(--bg-deep);
  stroke-width: 1.4;
  opacity: 0.78;
}

.bus-via-hole {
  fill: var(--bg-deep);
}

.pcb-silk {
  fill: none;
  stroke: var(--silk-faint);
  stroke-width: 1;
}

.pcb-pad {
  fill: var(--gold);
  opacity: 0.55;
}

.pcb-lbl {
  fill: var(--silk-dim);
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.pcb-led {
  fill: var(--led-ok);
  filter: drop-shadow(0 0 5px var(--led-ok));
  animation: pcbLedBlink 2.2s steps(2, end) infinite;
}

.pcb-led.amber {
  fill: var(--gold-hi);
  filter: drop-shadow(0 0 5px var(--gold-hi));
  animation-duration: 3.1s;
}

@keyframes pcbLedBlink {

  0%,
  100% {
    opacity: 0.95;
  }

  50% {
    opacity: 0.2;
  }
}

/* Topbar Hardware Header — Oscilloscope Channel Bank Bezel */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background:
    linear-gradient(180deg, rgba(16, 21, 19, 0.96) 0%, rgba(11, 15, 13, 0.94) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--ic-edge);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

html:not(.crt-active) .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

html:not(.crt-active) .board {
  padding-top: 67px;
}

.topbar-in {
  max-width: 1420px;
  margin-inline: auto;
  padding: 8px var(--gutter);
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-stencil);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 13px 6px 10px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(180deg, #1b201e 0%, #111513 100%);
  color: var(--ic-ink);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 0 #070908, inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.brand:hover {
  border-color: var(--gold-hi);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #070908, 0 0 12px rgba(230, 194, 116, 0.2);
}

.brand:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #070908;
}

.brand-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--led-ok);
  box-shadow: 0 0 8px var(--led-ok);
  flex-shrink: 0;
}

.brand svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Live Probe HUD */
.hud {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  background: #0a0d0c;
  border: 1.5px solid var(--ic-edge);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--ic-ink);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-sep {
  width: 1px;
  height: 14px;
  background: var(--ic-edge);
}

.hud-k {
  color: var(--ic-dim);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

#hudNet {
  color: var(--led-ok);
  font-weight: 500;
  min-width: 10ch;
}

#hudV {
  color: var(--gold-hi);
  font-weight: 500;
  min-width: 4ch;
}

#hudV::after {
  content: "V";
  color: var(--ic-dim);
  margin-left: 1px;
}

/* Center Recessed Oscilloscope Channel Bank */
.nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  background: #090c0b;
  border: 1.5px solid var(--ic-edge);
  border-radius: 5px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 6px;
  font-family: var(--f-mono);
  font-size: 0.73rem;
  color: var(--ic-dim);
  background: linear-gradient(180deg, #1a1f1d 0%, #121615 100%);
  border: 1px solid #262e2b;
  border-radius: 3px;
  box-shadow: 0 2px 0 #050706, inset 0 1px 0 rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.nav a .ch-led {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #2a3330;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, width 0.18s ease;
}

.nav a b {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  padding-right: 4px;
  border-right: 1px solid rgba(230, 194, 116, 0.22);
}

.nav a:hover {
  color: var(--ic-ink);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.nav a:hover .ch-led {
  background: var(--gold-hi);
  box-shadow: 0 0 6px var(--gold-hi);
}

.nav a.is-active {
  color: var(--ic-ink);
  background: linear-gradient(180deg, #1f2924 0%, #141b18 100%);
  border-color: var(--gold-hi);
  transform: translateY(1px);
  box-shadow: 0 1px 0 #050706, inset 0 0 10px rgba(91, 227, 139, 0.12);
}

.nav a.is-active .ch-led {
  width: 26px;
  background: var(--led-ok);
  box-shadow: 0 0 8px var(--led-ok), 0 0 3px #fff;
}

.nav a.is-active b {
  color: var(--led-ok);
  border-right-color: rgba(91, 227, 139, 0.35);
}

/* Right Bay — Live Oscilloscope Mini-Waveform & Status Pod */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.scope-pod {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px 5px 7px;
  background: #0a0d0c;
  border: 1.5px solid var(--ic-edge);
  border-radius: 4px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scope-pod:hover {
  border-color: var(--gold);
}

/* 4-Pin Hardware UART0 Serial Header Button in Topbar */
.uart-port-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  background: linear-gradient(180deg, #1b211e 0%, #101513 100%);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  color: var(--ic-ink);
  font-family: var(--f-mono);
  box-shadow: 0 2px 0 #050706, inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.uart-port-btn:hover {
  border-color: var(--gold-hi);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #050706, 0 0 12px rgba(230, 194, 116, 0.25);
}

.uart-port-btn.is-active {
  background: linear-gradient(180deg, #1e2c24 0%, #121c17 100%);
  border-color: var(--led-ok);
  box-shadow: 0 1px 0 #050706, 0 0 12px rgba(91, 227, 139, 0.28);
  transform: translateY(1px);
}

.uart-pins {
  display: inline-grid;
  grid-template-columns: repeat(2, 5px);
  gap: 3px;
  padding: 3px;
  background: #070a09;
  border: 1px solid #2c3631;
  border-radius: 2px;
}

.uart-pins i {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: linear-gradient(135deg, #fff1b8, #d9ae56);
  box-shadow: 0 0 3px rgba(230, 194, 116, 0.6);
}

.uart-port-btn.is-active .uart-pins i:nth-child(1) {
  background: var(--led-ok);
  box-shadow: 0 0 6px var(--led-ok);
}

.uart-port-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.08;
}

.uart-port-txt b {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gold-hi);
  letter-spacing: 0.06em;
}

.uart-port-btn.is-active .uart-port-txt b {
  color: var(--led-ok);
}

.uart-port-txt small {
  font-size: 0.56rem;
  color: var(--ic-dim);
  letter-spacing: 0.06em;
}

.scope-screen {
  width: 62px;
  height: 24px;
  background: #06110c;
  border: 1px solid rgba(91, 227, 139, 0.32);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.scope-screen svg {
  width: 100%;
  height: 100%;
  display: block;
}

.scope-grid {
  fill: none;
  stroke: rgba(91, 227, 139, 0.14);
  stroke-width: 0.7;
}

.scope-wave {
  fill: none;
  stroke: var(--led-ok);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px var(--led-ok));
  stroke-dasharray: 72;
  animation: scopeTrace 2.2s steps(24, end) infinite;
}

@keyframes scopeTrace {
  0% {
    stroke-dashoffset: 72;
  }

  100% {
    stroke-dashoffset: -72;
  }
}

.scope-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--f-mono);
  line-height: 1.1;
}

.scope-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  color: var(--led-ok);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.scope-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--led-ok);
  box-shadow: 0 0 6px var(--led-ok);
  animation: pcbLedBlink 1.8s steps(2, end) infinite;
}

.scope-loc {
  font-size: 0.6rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

/* Topbar Tool Buttons (Mobile channel menu only) */
.tools {
  display: none;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
  margin-left: auto;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--ic);
  color: var(--ic-ink);
  border: 1px solid var(--gold);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.tool svg {
  width: 16px;
  height: 16px;
}

.tool:hover {
  background: var(--ic-elev);
}

.tool[aria-expanded="true"] {
  background: var(--gold);
  color: #111;
}

.tool[hidden] {
  display: none !important;
}

.tool-menu {
  display: none;
  padding: 7px 11px;
  background: linear-gradient(180deg, #1b201e 0%, #111513 100%);
  box-shadow: 0 3px 0 #070908;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.menu-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}

.tool-menu[aria-expanded="true"] .menu-led {
  background: #111;
  box-shadow: none;
}

.lyr-crt-btn {
  width: 100%;
  margin-top: var(--s2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(230, 194, 116, 0.1);
  color: var(--gold-hi);
  border: 1px solid var(--gold);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lyr-crt-btn svg {
  width: 15px;
  height: 15px;
}

.lyr-crt-btn:hover {
  background: var(--gold);
  color: #111;
}

/* KiCad Layers & Board Finish Panel */
.layers {
  position: absolute;
  top: calc(100% + 8px);
  right: var(--gutter);
  width: min(310px, calc(100vw - 32px));
  background: var(--ic);
  color: var(--ic-ink);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: var(--s3);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  z-index: 80;
}

.layers[hidden] {
  display: none !important;
}

.layers-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ic-dim);
  padding-bottom: var(--s2);
  margin-bottom: var(--s2);
  border-bottom: 1px solid var(--ic-edge);
}

.layers-h:not(:first-child) {
  margin-top: var(--s3);
}

.layers-h span {
  color: var(--gold);
}

.lyr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.lyr:hover {
  background: var(--ic-elev);
}

.lyr input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lyr-sw {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--c, var(--gold));
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.lyr-sw-motion {
  background: var(--led-ok);
  border-radius: 50%;
}

.lyr input:not(:checked)~.lyr-sw {
  opacity: 0.25;
}

.lyr-t {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  line-height: 1.25;
}

.lyr-t small {
  font-family: var(--f-sans);
  font-size: 0.72rem;
  color: var(--ic-dim);
  margin-top: 2px;
}

.lyr-eye {
  width: 28px;
  height: 16px;
  border-radius: 99px;
  background: #2b322f;
  border: 1px solid #3c4642;
  position: relative;
  transition: background-color 0.18s ease;
}

.lyr-eye::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ic-dim);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.lyr input:checked~.lyr-eye {
  background: rgba(91, 227, 139, 0.2);
  border-color: var(--led-ok);
}

.lyr input:checked~.lyr-eye::after {
  transform: translateX(12px);
  background: var(--led-ok);
}

/* Board Color Swatches */
.boards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s2);
  margin-bottom: var(--s3);
}

.bsw {
  height: 32px;
  border-radius: 3px;
  background: var(--c);
  border: 2px solid var(--ic-edge);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.bsw:hover {
  transform: translateY(-1px);
}

.bsw[aria-pressed="true"] {
  border-color: var(--gold-hi);
  box-shadow: 0 0 0 2px rgba(230, 194, 116, 0.35);
}

.bsw[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--gold-hi);
}

.lyr-motion {
  border-top: 1px solid var(--ic-edge);
  padding-top: 10px;
}

/* Tactile Hardware Switch Buttons (.tact) */
.tact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  background: var(--gold);
  color: #121514;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid #121514;
  border-radius: 3px;
  box-shadow: 0 4px 0 #121514;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.tact svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tact:hover {
  background: var(--gold-hi);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #121514;
}

.tact:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #121514;
}

.tact.ghost {
  background: var(--ic);
  color: var(--ic-ink);
  border-color: var(--gold);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.55);
}

.tact.ghost:hover {
  background: var(--ic-elev);
  border-color: var(--gold-hi);
}

/* Responsive Topbar */
@media (max-width: 1220px) {
  .scope-pod {
    display: none;
  }
}

@media (max-width: 1040px) {
  .hud {
    display: none;
  }
}

@media (max-width: 860px) {
  html:not(.crt-active) .board {
    padding-top: 59px;
  }

  .topbar-in {
    min-height: 58px;
    padding: 6px var(--gutter);
  }

  .brand {
    font-size: clamp(0.92rem, 3.6vw, 1.12rem);
    padding: 5px 10px 5px 8px;
    gap: 7px;
  }

  .brand svg {
    width: 20px;
    height: 20px;
  }

  .tools {
    display: flex;
  }

  .tool[hidden] {
    display: none !important;
  }

  .tool-menu {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    border-radius: 0 0 6px 6px;
    border-inline: none;
    border-top: none;
    background: #0a0d0c;
    border-bottom: 2px solid var(--gold);
    padding: 12px var(--gutter) 14px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.75);
  }

  .nav.is-open {
    display: grid;
  }

  .nav a {
    color: var(--ic-ink);
    padding: 12px 14px 10px;
    font-size: 0.78rem;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .topbar-in {
    gap: 6px;
  }

  .topbar-right {
    gap: 5px;
  }

  .uart-port-btn {
    padding: 4px 7px;
    gap: 5px;
  }

  .uart-port-txt small {
    display: none;
  }

  .tools {
    gap: 4px;
  }

  .tool {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  #layersBtn span {
    display: none;
  }

  .tool-menu {
    width: auto;
    padding: 0 9px;
  }

  .nav {
    padding: 10px 12px 12px;
    gap: 6px;
  }

  .nav a {
    padding: 10px 10px 8px;
    font-size: 0.74rem;
    gap: 6px;
  }
}

@media (max-width: 440px) {
  .brand-led {
    display: none;
  }

  .brand {
    font-size: 0.82rem;
    padding: 4px 6px;
    gap: 5px;
  }

  .brand svg {
    width: 17px;
    height: 17px;
  }

  .uart-pins {
    gap: 2px;
  }

  .uart-pins i {
    width: 3px;
    height: 8px;
  }

  .uart-port-txt b {
    font-size: 0.66rem;
  }

  .tact {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .uart-port-txt {
    display: none;
  }
}