@font-face {
  font-family: Manrope;
  src: url("/media/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
.serial-config {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}
.serial-config label {
  flex: 1 1 100px;
  max-width: 170px;
  margin: 0;
}
.serial-config .button {
  margin-bottom: 1px;
}
.serial-custom-row {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.serial-custom-row label {
  flex: 0 0 auto;
  max-width: none;
  margin: 0;
}
.serial-config [hidden] {
  display: none;
}
.serial-wiring {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.serial-wiring summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
}
.serial-wiring-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
}
.serial-wiring-body svg {
  width: 100%;
  height: auto;
}
.serial-wiring-body p {
  margin-top: 10px;
  font-size: 12px;
}
.serial-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.serial-console-toolbar,
.serial-console-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
}
.serial-console-toolbar {
  border-bottom: 1px solid var(--line);
}
.serial-console-toolbar .filter-pill,
.serial-search .filter-pill {
  margin: 0;
}
.serial-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.serial-search .search-field {
  flex: 1 1 200px;
}
.serial-search .search-field input {
  width: 100%;
}
.serial-console {
  position: relative;
  height: clamp(310px, 54vh, 650px);
  background: var(--bg);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  font:
    12px/24px JetBrains,
    monospace;
  outline-offset: -2px;
}
#serial-height {
  position: relative;
  min-width: 100%;
}
#serial-rows {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
}
.serial-row {
  height: 24px;
  display: flex;
  align-items: baseline;
  white-space: pre;
  min-width: max-content;
  padding-right: 20px;
}
.serial-line-number {
  flex: 0 0 65px;
  padding-right: 12px;
  text-align: right;
  color: var(--dim);
  font-size: 10px;
  user-select: none;
}
.serial-row time {
  flex: 0 0 136px;
  color: var(--accent);
  font-size: 10px;
}
.serial-text {
  white-space: pre;
  tab-size: 4;
}
.serial-row.selected {
  background: var(--surface2);
}
.serial-row mark {
  background: var(--accent-soft);
  color: var(--text);
}
.serial-row mark.current {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 2px;
}
.serial-empty {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  padding: 25px;
  text-align: center;
  font-family: Manrope, sans-serif;
}
.serial-empty[hidden] {
  display: none;
}
.serial-empty .icon {
  width: 36px;
  height: 36px;
  color: var(--cyan);
}
.serial-empty strong {
  color: var(--text);
  font-size: 16px;
}
.serial-console-footer {
  border-top: 1px solid var(--line);
  font:
    10px JetBrains,
    monospace;
  color: var(--muted);
}
.serial-export-type {
  margin: 0;
  width: auto;
}
@media (max-width: 800px) {
  .serial-wiring-body {
    grid-template-columns: 1fr;
  }
  .serial-wiring-body svg {
    max-height: 170px;
  }
  .serial-console-toolbar,
  .serial-search,
  .serial-console-footer {
    padding: 10px;
  }
  .serial-config label {
    max-width: none;
  }
  .serial-line-number {
    flex-basis: 44px;
  }
  .serial-row time {
    flex-basis: 112px;
    font-size: 9px;
  }
}
@font-face {
  font-family: JetBrains;
  src: url("/media/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}
:root {
  font-family: Manrope, system-ui, sans-serif;
  color-scheme: dark;
  --bg: #11131b;
  --sidebar: #141720;
  --surface: #191c27;
  --surface2: #1e2230;
  --surface3: #242938;
  --line: #2b3040;
  --text: #edf0f8;
  --muted: #989fb5;
  --dim: #707990;
  --accent: #ae98ff;
  --accent-ink: #1b123b;
  --accent-soft: #2b2544;
  --cyan: #4bd1d7;
  --cyan-soft: #1b333e;
  --red: #f28e9d;
  --amber: #e9c68b;
  --shadow: 0 14px 44px #0003;
  --radius: 14px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --sidebar: #fff;
  --surface: #fff;
  --surface2: #f1f3f8;
  --surface3: #e9ecf5;
  --line: #e0e4ee;
  --text: #242638;
  --muted: #626b83;
  --dim: #7b8297;
  --accent: #7150ce;
  --accent-ink: #fff;
  --accent-soft: #ece7fb;
  --cyan: #117f8a;
  --cyan-soft: #e4f4f6;
  --red: #bd405b;
  --amber: #9d6619;
  --shadow: 0 14px 44px #32385a0a;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1.2px;
  font-weight: 750;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
}
p {
  color: var(--muted);
}
small {
  font-size: 11px;
}
.mono,
code,
pre {
  font-family: JetBrains, monospace;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
code {
  color: var(--cyan);
  font-size: 0.9em;
}
.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  padding: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
}
.icon-button:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--line);
}
.skip {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 29px 17px 15px;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1.8px;
  color: var(--text);
  padding: 0 8px;
  margin-bottom: 29px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 9px;
  width: 34px;
  height: 35px;
  font-size: 35px;
  font-weight: 600;
  margin-right: 4px;
}
.brand-dot {
  color: var(--cyan);
  margin-left: -6px;
}
.brand-edition {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: var(--dim);
  font-weight: 700;
  margin: 13px 0 0 4px;
}
.project-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--line);
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  width: 100%;
  margin-bottom: 24px;
}
.project-switch > span:nth-child(2) {
  min-width: 0;
}
.project-switch strong {
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 145px;
}
.project-switch small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.project-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 700;
}
.switch-arrow {
  margin-left: auto;
  color: var(--dim);
}
.nav-label {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 1.7px;
  text-transform: uppercase;
  margin: 19px 11px 7px;
  font-weight: 700;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  margin: 2px 0;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-link .icon {
  width: 17px;
  height: 17px;
}
.nav-link.child {
  font-size: 11px;
  padding: 8px 12px 8px 39px;
  position: relative;
}
.nav-link.child:before {
  content: "";
  height: 100%;
  width: 1px;
  background: var(--line);
  position: absolute;
  left: 20px;
  top: 0;
}
.nav-link.child.active:after {
  content: "";
  position: absolute;
  left: 17px;
  width: 7px;
  height: 7px;
  border-radius: 3px;
  background: var(--accent);
}
.nav-count {
  margin-left: auto;
  font: 10px JetBrains;
  color: var(--dim);
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 25px;
}
.field-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px;
  color: var(--muted);
  margin: 7px 0 23px;
}
.field-guide strong {
  font-size: 10px;
  color: var(--text);
  display: block;
}
.field-guide small {
  display: block;
  font-size: 9px;
}
.sidebar-credit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3px 14px;
}
.sidebar-credit > a {
  font-size: 10px;
  color: var(--muted);
  font-weight: 800;
}
.sidebar-credit > a span {
  color: var(--red);
}
.sidebar-credit small {
  font-size: 8px;
  color: var(--dim);
}
.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  width: 100%;
  padding: 16px 3px 0;
  text-align: left;
}
.avatar {
  background: var(--cyan-soft);
  color: var(--cyan);
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
.account-button strong {
  font-size: 11px;
  display: block;
}
.account-button small {
  font-size: 9px;
  display: block;
  color: var(--dim);
}
.account-button > span:last-child {
  margin-left: auto;
  color: var(--dim);
}
.shell {
  margin-left: 244px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 72px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}
.breadcrumbs span span {
  color: var(--text);
}
.breadcrumbs i {
  color: var(--dim);
  margin: 0 12px;
  font-style: normal;
}
.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.connection-pill {
  font-size: 10px;
  color: var(--dim);
  margin-right: 17px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection-pill i {
  height: 6px;
  width: 6px;
  border-radius: 100%;
  background: var(--dim);
}
.connection-pill.connected {
  color: var(--cyan);
}
.connection-pill.connected i {
  background: var(--cyan);
}
#mobile-menu {
  display: none;
}
main {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 34px 38px 45px;
  flex: 1;
  outline: none;
}
.app-footer {
  border-top: 1px solid var(--line);
  margin: 0 38px;
  padding: 18px 0 22px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--dim);
}
.app-footer > span:first-child {
  letter-spacing: 1.4px;
  font-family: JetBrains;
}
.app-footer a {
  color: var(--muted);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.page-heading p {
  font-size: 12px;
  margin-top: 9px;
  max-width: 740px;
}
.eyebrow {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 750;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.eyebrow:before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--accent);
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.actions.end {
  justify-content: flex-end;
  margin-top: 20px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.button:hover {
  background: var(--surface3);
  text-decoration: none;
  border-color: var(--dim);
}
.button .icon {
  width: 16px;
  height: 16px;
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.button.primary:hover {
  filter: brightness(1.08);
}
.button.cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: transparent;
}
.button.danger {
  color: var(--red);
  border-color: var(--red);
}
.button.small {
  padding: 6px 10px;
  font-size: 10px;
}
.button.full {
  width: 100%;
}
.text-button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  padding: 4px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}
.card-head h2 {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-head .icon {
  color: var(--muted);
  width: 17px;
}
.card-head p {
  font-size: 10px;
}
.number {
  font: 10px JetBrains;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  letter-spacing: 0.6px;
  font-weight: 750;
  text-transform: uppercase;
  padding: 4px 7px;
  white-space: nowrap;
  border-radius: 4px;
  background: var(--surface3);
  color: var(--muted);
}
.badge.violet {
  color: var(--accent);
  background: var(--accent-soft);
}
.badge.cyan {
  color: var(--cyan);
  background: var(--cyan-soft);
}
.badge.warning {
  color: var(--amber);
}
.notice {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 13px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  margin-bottom: 22px;
  color: var(--muted);
}
.notice .icon {
  color: var(--accent);
  width: 17px;
}
.notice strong {
  color: var(--text);
}
.notice .actions {
  margin-left: auto;
}
.notice.warning {
  border-color: var(--amber);
}
.notice.subtle {
  font-size: 10px;
  margin-top: 15px;
  margin-bottom: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mt {
  margin-top: 22px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 29px 0 15px;
}
.section-head h2 {
  font-size: 16px;
}
.section-head p {
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 10px;
}
.cyan-text {
  color: var(--cyan);
}
.accent-text {
  color: var(--accent);
}
.error-text {
  color: var(--red);
  font-size: 12px;
  white-space: pre-wrap;
}
.label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 7px;
}
label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: block;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
  width: 100%;
  border-radius: 7px;
  font-size: 12px;
  min-width: 0;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
input::placeholder,
textarea::placeholder {
  color: var(--dim);
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  margin: 0;
}
input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 500;
  margin: 13px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.field-help {
  font-size: 10px;
  line-height: 1.7;
  margin: 7px 0 14px;
}
form > label {
  margin-bottom: 16px;
}
.search-field {
  position: relative;
}
.search-field > .icon {
  position: absolute;
  top: 11px;
  left: 12px;
  color: var(--dim);
  width: 17px;
}
.search-field input {
  padding-left: 37px;
}
.search-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 6px;
  background: var(--bg);
  max-height: 250px;
  overflow: auto;
}
.search-result {
  display: block;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  color: var(--text);
}
.search-result:last-child {
  border-bottom: 0;
}
.search-result:hover {
  background: var(--surface2);
}
.search-result strong {
  display: block;
  font: 11px JetBrains;
}
.search-result small {
  color: var(--dim);
  font-size: 9px;
}
.chip-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 14px 0 20px;
}
.chip-meta dt {
  font-size: 9px;
  color: var(--dim);
}
.chip-meta dd {
  font-size: 11px;
  margin: 3px 0 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.programmer-art {
  display: block;
  width: 100%;
  height: 190px;
}
.chip-art {
  width: 100%;
  height: 155px;
  display: block;
}
.hardware-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.1fr 1fr;
  gap: 18px;
}
.device-caption {
  text-align: center;
  margin: 3px 0 15px;
}
.device-caption strong {
  font-size: 12px;
  display: block;
}
.device-caption small {
  font-size: 10px;
  color: var(--dim);
}
.target-visual {
  height: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  margin-top: 16px;
}
.target-visual svg {
  height: 128px;
  width: 200px;
}
.workflow-list {
  list-style: none;
  padding: 0;
  margin: 17px 0;
}
.workflow-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 15px 0;
  font-size: 11px;
  color: var(--muted);
}
.workflow-list li span:first-child {
  font: 10px JetBrains;
  background: var(--surface3);
  color: var(--cyan);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.workflow-list strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}
.operation-state {
  font: 10px JetBrains;
  color: var(--muted);
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.progress {
  height: 4px;
  background: var(--surface3);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 15px;
}
.progress progress {
  width: 100%;
  height: 4px;
  display: block;
  accent-color: var(--cyan);
}
progress::-webkit-progress-bar {
  background: var(--surface3);
}
progress::-webkit-progress-value {
  background: var(--cyan);
}
.welcome {
  max-width: 860px;
  text-align: center;
  margin: 22px auto 25px;
}
.welcome-art {
  width: 260px;
  margin: 0 auto -5px;
}
.welcome-art .chip-art {
  height: 200px;
}
.welcome .eyebrow {
  justify-content: center;
}
.welcome h1 {
  font-size: 46px;
  letter-spacing: -2px;
  margin-bottom: 15px;
}
.welcome > p {
  max-width: 470px;
  margin: auto;
  line-height: 1.9;
  font-size: 13px;
}
.welcome-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px;
  text-align: left;
  margin: 34px auto 22px;
  max-width: 690px;
}
.choice {
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  position: relative;
  transition:
    transform 0.16s,
    border-color 0.16s;
}
.choice:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  text-decoration: none;
}
.choice > .icon {
  width: 27px;
  height: 27px;
  color: var(--accent);
  margin-bottom: 20px;
}
.choice h2 {
  font-size: 16px;
  margin-bottom: 8px;
}
.choice p {
  font-size: 11px;
  max-width: 230px;
  line-height: 1.8;
}
.choice .choice-arrow {
  position: absolute;
  right: 22px;
  top: 24px;
  color: var(--dim);
  font-size: 22px;
}
.welcome-tags {
  display: flex;
  justify-content: center;
  gap: 23px;
  font-size: 9px;
  color: var(--dim);
  margin: 22px 0;
}
.welcome-tags span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.welcome-tags .icon {
  width: 13px;
  height: 13px;
  color: var(--cyan);
}
.welcome-library {
  font-size: 11px;
  color: var(--muted);
}
.library-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 185px;
}
.library-hero h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
  margin: 8px 0 9px;
}
.library-hero p {
  font-size: 11px;
  max-width: 480px;
  line-height: 1.9;
}
.library-art {
  width: 240px;
  flex-shrink: 0;
  transform: rotate(-7deg);
  margin: -25px -4px -28px 20px;
}
.library-art svg {
  height: 220px;
}
.library-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1.7fr) repeat(3, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}
.library-controls select {
  font-size: 10px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-pill {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-pill.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.filter-pill .icon {
  width: 13px;
  height: 13px;
}
.filter-row .count {
  margin-left: auto;
  color: var(--dim);
  font-size: 10px;
}
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.chip-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.chip-card:hover {
  border-color: var(--dim);
}
.chip-card-art {
  height: 136px;
  background: var(--surface2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chip-card-art .chip-art {
  height: 150px;
  width: 225px;
}
.favorite {
  position: absolute;
  right: 10px;
  top: 10px;
}
.favorite.active {
  color: var(--amber);
}
.favorite.active svg {
  fill: var(--amber);
}
.chip-card-copy {
  padding: 17px 18px;
}
.chip-maker {
  font-size: 8px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.chip-card h3 {
  font: 600 12px JetBrains;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.chip-card h3 a {
  color: var(--text);
}
.chip-card-specs {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
  margin: 9px 0 14px;
}
.chip-card-footer {
  border-top: 1px solid var(--line);
  padding-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.chip-card-footer a {
  font-size: 9px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin-top: 25px;
  font-size: 11px;
  color: var(--muted);
}
.learning-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 25px;
}
.learn-link {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 15px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
}
.learn-link span {
  display: block;
  color: var(--dim);
  font-size: 9px;
  margin-top: 4px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
}
.detail-art {
  background: var(--surface2);
  border-radius: 9px;
  padding: 15px;
}
.detail-art svg {
  height: 235px;
}
.definition-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 11px;
  font-size: 12px;
}
.definition-list dt {
  color: var(--dim);
}
.definition-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.source-link {
  font-size: 11px;
  display: block;
  margin: 9px 0;
  overflow-wrap: anywhere;
}
.diagram svg {
  width: 100%;
  height: auto;
  max-height: 270px;
}
.guide-body {
  max-width: 880px;
  font-size: 13px;
}
.guide-body p {
  margin: 13px 0;
  line-height: 1.9;
}
.guide-body h2 {
  margin: 26px 0 10px;
  font-size: 20px;
}
.guide-body h3 {
  margin: 19px 0 8px;
}
.guide-body li {
  color: var(--muted);
  margin: 9px 0;
}
.guide-body strong {
  color: var(--text);
}
.guide-card .guide-illustration {
  height: 145px;
  background: var(--surface2);
  margin: -23px -23px 21px;
  border-radius: 13px 13px 0 0;
  overflow: hidden;
}
.guide-card .guide-illustration svg {
  width: 100%;
  height: 150px;
}
.guide-card h3 {
  margin-bottom: 8px;
}
.guide-card p {
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 17px;
}
.guide-card .guide-tag {
  font: 9px JetBrains;
  color: var(--accent);
  margin-bottom: 9px;
}
.buffer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
}
.buffer-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.buffer-name > .icon {
  color: var(--accent);
  width: 23px;
  height: 23px;
}
.buffer-name h2 {
  font: 500 12px JetBrains;
  overflow-wrap: anywhere;
}
.buffer-name small {
  display: block;
  color: var(--dim);
  font-size: 9px;
  margin-top: 3px;
}
.hex-tools {
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 17px;
  flex-wrap: wrap;
}
.hex-tools input {
  max-width: 170px;
  padding: 7px 9px;
  font: 10px JetBrains;
}
.hex-tools label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
}
.hex-tools label input {
  margin: 0;
  width: 105px;
}
.hex-tools select {
  width: 100px;
  padding: 7px;
  font-size: 10px;
}
.hex-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  overflow-x: auto;
}
.hex-table {
  border-collapse: collapse;
  min-width: 710px;
  width: 100%;
  font-family: JetBrains, monospace;
  font-size: 11px;
  table-layout: fixed;
}
.hex-table th {
  font-weight: 400;
  font-size: 9px;
  color: var(--dim);
  background: var(--surface2);
  height: 34px;
  text-align: center;
}
.hex-table th.address {
  width: 90px;
  text-align: left;
  padding-left: 18px;
}
.hex-table th.ascii-title {
  width: 207px;
  text-align: left;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  letter-spacing: 1.2px;
}
.hex-table td {
  height: 24px;
  padding: 0;
  text-align: center;
}
.hex-table tr:nth-child(2n) {
  background: color-mix(in srgb, var(--surface2) 42%, transparent);
}
.hex-table .address {
  text-align: left;
  padding-left: 18px;
  color: var(--dim);
  font-size: 10px;
}
.hex-byte {
  background: none;
  border: none;
  color: var(--text);
  padding: 2px 0;
  width: 100%;
  font: inherit;
  border-radius: 3px;
}
.hex-byte.zero {
  color: var(--dim);
  opacity: 0.75;
}
.hex-byte.ff {
  color: #a89679;
}
.hex-byte.text {
  color: var(--cyan);
}
.hex-byte.changed {
  color: var(--accent);
  background: var(--accent-soft);
}
.hex-byte.selected {
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 1;
}
.hex-ascii {
  padding-left: 18px !important;
  text-align: left !important;
  border-left: 1px solid var(--line);
  white-space: pre;
  color: var(--muted);
}
.ascii-byte {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  font: inherit;
  display: inline-block;
  width: 10px;
}
.ascii-byte.selected {
  background: var(--accent);
  color: var(--accent-ink);
}
.hex-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 12px 18px;
  background: var(--surface);
  font: 9px JetBrains;
  color: var(--dim);
}
.hex-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  font: 9px JetBrains;
  margin: 12px 0;
}
.hex-legend i {
  height: 6px;
  width: 6px;
  display: inline-block;
  background: var(--cyan);
  margin-right: 5px;
  border-radius: 2px;
}
.hex-legend .modified {
  background: var(--accent);
}
.hex-legend .blank {
  background: #a89679;
}
.inspector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.inspector > div {
  padding: 14px;
  background: var(--surface2);
  border-radius: 8px;
}
.inspector small {
  font-size: 9px;
  color: var(--dim);
  display: block;
  margin-bottom: 5px;
}
.inspector strong {
  font: 12px JetBrains;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 23px;
}
.stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.stat small {
  font-size: 9px;
  color: var(--dim);
  display: block;
}
.stat strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.5px;
  margin: 4px 0;
}
.stat span {
  font: 9px JetBrains;
  color: var(--cyan);
}
.tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.tab {
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 11px;
}
.tab.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.table-wrap {
  overflow: auto;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
.data-table th {
  text-align: left;
  color: var(--dim);
  font-size: 9px;
  font-weight: 600;
  padding: 11px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--muted);
  overflow-wrap: anywhere;
  max-width: 440px;
}
.data-table td:first-child {
  color: var(--text);
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table .actions {
  flex-wrap: nowrap;
}
.entropy-canvas {
  width: 100%;
  height: 150px;
  display: block;
}
.string-list {
  max-height: 500px;
  overflow: auto;
}
.string-row {
  display: flex;
  gap: 18px;
  font: 10px JetBrains;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.string-row button {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  align-self: flex-start;
}
.string-row span {
  white-space: pre-wrap;
}
.sector-map {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 3px;
}
.sector {
  aspect-ratio: 1;
  background: var(--accent-soft);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
.sector.blank {
  background: #77718a;
}
.sector.zero {
  background: var(--surface3);
}
.sector.mixed {
  background: var(--cyan);
}
.analysis-report {
  font: 11px/1.9 JetBrains;
  white-space: pre-wrap;
  color: var(--muted);
  max-height: 600px;
  overflow: auto;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.project-card {
  display: block;
  color: var(--text);
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.project-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.project-card > .icon {
  color: var(--accent);
  width: 28px;
  height: 28px;
  margin-bottom: 21px;
}
.project-card h3 {
  font-size: 15px;
  margin-bottom: 7px;
}
.project-card p {
  font-size: 11px;
  margin-bottom: 23px;
  min-height: 35px;
}
.project-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.evidence-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
  min-width: 0;
}
.evidence-card > .icon {
  color: var(--cyan);
  margin-bottom: 12px;
}
.evidence-card h3 {
  font: 11px JetBrains;
  overflow-wrap: anywhere;
}
.evidence-card p {
  font-size: 10px;
  margin: 7px 0;
}
.evidence-card .hash {
  font: 8px JetBrains;
  color: var(--dim);
  overflow-wrap: anywhere;
  margin: 11px 0;
}
.event-list {
  list-style: none;
  padding: 0;
  max-height: 430px;
  overflow: auto;
}
.event-list li {
  border-left: 1px solid var(--line);
  padding: 0 0 20px 18px;
  position: relative;
}
.event-list li:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.event-list strong {
  font-size: 11px;
  display: block;
}
.event-list p {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.event-list small {
  font-size: 9px;
  color: var(--dim);
}
.evidence-preview {
  max-width: 100%;
  max-height: 65vh;
  display: block;
  margin: auto;
}
.logic-toolbar {
  display: flex;
  gap: 13px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.logic-toolbar label {
  min-width: 105px;
  flex: 1;
  font-size: 9px;
}
.logic-toolbar input,
.logic-toolbar select {
  font-size: 11px;
}
.logic-toolbar .button {
  margin-bottom: 1px;
}
.waveform-container {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  overflow: hidden;
  margin-top: 20px;
  position: relative;
}
.waveform-header {
  display: flex;
  justify-content: space-between;
  padding: 13px 18px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.waveform {
  width: 100%;
  height: 530px;
  display: block;
  cursor: crosshair;
}
.waveform-footer {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 17px;
  align-items: center;
  padding: 11px 18px;
  font: 9px JetBrains;
  color: var(--muted);
}
.waveform-footer input {
  flex: 1;
}
.terminal {
  background: #0d1119;
  color: #71ded4;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 11px/1.8 JetBrains;
  padding: 18px;
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
}
.terminal-header {
  color: var(--dim);
  font-size: 9px;
  padding-bottom: 13px;
  display: flex;
  justify-content: space-between;
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font: 9px JetBrains;
}
.live-indicator:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: var(--cyan);
}
.live-indicator.running:before {
  animation: pulse 1s infinite;
}
.decoder-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-nav a {
  padding: 12px 15px;
  font-size: 12px;
  border-radius: 7px;
  color: var(--muted);
}
.admin-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.about-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 330px;
}
.about-hero h1 {
  font-size: 43px;
}
.about-hero p {
  margin: 19px 0;
  font-size: 13px;
  line-height: 1.9;
}
.about-hero svg {
  height: 280px;
}
.signature {
  font: 11px JetBrains;
  color: var(--cyan);
}
.empty {
  text-align: center;
  padding: 46px 20px;
}
.empty > .icon {
  width: 35px;
  height: 35px;
  color: var(--dim);
  margin-bottom: 14px;
}
.empty h3 {
  font-size: 15px;
  margin-bottom: 9px;
}
.empty p {
  font-size: 12px;
  max-width: 430px;
  margin: 0 auto 21px;
  line-height: 1.8;
}
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 250px;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 100%;
  animation: spin 0.7s linear infinite;
}
dialog {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  max-width: 650px;
  width: calc(100% - 32px);
  max-height: 90vh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #080b18aa;
  backdrop-filter: blur(5px);
}
.modal-head {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 17px;
}
.modal-body {
  padding: 22px 24px;
}
.modal-body > p {
  font-size: 12px;
  margin-bottom: 20px;
}
.modal-body form {
  margin-top: 15px;
}
#toasts {
  position: fixed;
  bottom: 23px;
  right: 25px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 450px;
  pointer-events: none;
}
.toast {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 13px 18px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  box-shadow: var(--shadow);
}
.toast.error {
  border-left-color: var(--red);
}
.mobile-open .sidebar {
  transform: translateX(0);
}
[hidden] {
  display: none !important;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@media (min-width: 1600px) {
  .chip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 218px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .shell {
    margin-left: 218px;
  }
  main {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .hardware-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hardware-grid > .card:last-child {
    grid-column: 1/-1;
  }
  .workflow-list {
    display: flex;
    gap: 20px;
  }
  .hardware-grid > .card:last-child .workflow-list li {
    flex: 1;
  }
  .chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-controls {
    grid-template-columns: 1fr 1fr;
  }
  .library-art {
    width: 180px;
  }
  .detail-grid {
    grid-template-columns: 250px 1fr;
  }
  .learning-links {
    grid-template-columns: 1fr 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
  .decoder-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hex-table {
    font-size: 10px;
  }
  .hex-table th.ascii-title {
    width: 190px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    width: 244px;
    transition: transform 0.2s;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 61px;
    padding: 0 18px;
  }
  #mobile-menu {
    display: inline-flex;
  }
  .connection-pill {
    font-size: 9px;
    margin-right: 0;
  }
  .connection-pill i {
    display: none;
  }
  main {
    padding: 23px 18px;
  }
  .app-footer {
    margin: 0 18px;
    font-size: 8px;
    gap: 15px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading .actions {
    justify-content: flex-end;
  }
  .page-heading p {
    font-size: 11px;
  }
  .welcome h1 {
    font-size: 36px;
  }
  .welcome {
    margin-top: 0;
  }
  .library-hero {
    padding: 22px;
  }
  .library-hero h2 {
    font-size: 21px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid > .card:first-child {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
  }
  .detail-grid .detail-art svg {
    height: 180px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-nav a {
    padding: 7px 10px;
    font-size: 10px;
  }
  .about-hero {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .about-hero svg {
    height: 200px;
  }
  .about-hero h1 {
    font-size: 33px;
  }
  .evidence-grid {
    grid-template-columns: 1fr 1fr;
  }
  .inspector {
    grid-template-columns: 1fr 1fr;
  }
  .notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .notice .actions {
    margin-left: 27px;
  }
  .waveform {
    height: 510px;
  }
  .buffer-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .buffer-bar .actions {
    width: 100%;
  }
}
@media (max-width: 520px) {
  .hardware-grid,
  .grid2,
  .grid3,
  .welcome-choices,
  .chip-grid,
  .evidence-grid {
    grid-template-columns: 1fr;
  }
  .hardware-grid > .card:last-child {
    grid-column: auto;
  }
  .workflow-list {
    display: block;
  }
  .page-heading {
    flex-direction: column;
  }
  .page-heading .actions {
    justify-content: flex-start;
  }
  .library-art {
    display: none;
  }
  .library-controls {
    grid-template-columns: 1fr 1fr;
  }
  .library-controls .search-field {
    grid-column: 1/-1;
  }
  .library-controls select {
    font-size: 10px;
  }
  .library-hero {
    min-height: 0;
  }
  .welcome-art {
    width: 210px;
  }
  .welcome-art svg {
    height: 165px;
  }
  .welcome-choices {
    margin-top: 25px;
  }
  .choice {
    padding: 20px 23px;
  }
  .choice > .icon {
    margin-bottom: 14px;
  }
  .welcome-tags {
    gap: 12px;
    font-size: 8px;
  }
  .card {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid > .card:first-child {
    display: block;
  }
  .chip-card-art {
    height: 145px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat {
    padding: 13px;
  }
  .stat strong {
    font-size: 22px;
  }
  .decoder-grid {
    grid-template-columns: 1fr 1fr;
  }
  .learning-links {
    gap: 8px;
  }
  .learn-link {
    padding: 10px;
    font-size: 10px;
  }
  .app-footer {
    flex-direction: column;
    gap: 5px;
  }
  .top-actions {
    gap: 1px;
  }
  .breadcrumbs {
    gap: 5px;
  }
  .connection-pill {
    display: none;
  }
  .hex-footer {
    flex-wrap: wrap;
  }
  .modal-head,
  .modal-body {
    padding: 18px;
  }
  .sector-map {
    grid-template-columns: repeat(16, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
/* Shared layouts used by the native browser application. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  margin: 2px 0;
}
.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-item .icon {
  width: 17px;
  height: 17px;
}
.nav-item.nav-sub {
  padding-left: 35px;
  font-size: 11px;
}
.nav-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  margin: 13px 12px 5px;
}
.nav-group .icon {
  width: 14px;
  height: 14px;
}
.sidebar.open {
  transform: translateX(0);
}
.connection-pill i.connected {
  background: var(--cyan);
}
.choice > span:not(.choice-arrow) {
  display: block;
}
.choice strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}
.choice small {
  display: block;
  color: var(--muted);
  line-height: 1.8;
}
.library-controls {
  display: block;
}
.library-controls > .search-field {
  margin-bottom: 17px;
}
.search-field .button {
  flex-shrink: 0;
}
.filter-row > label {
  flex: 1;
  min-width: 130px;
  font-size: 10px;
}
.filter-pill {
  margin: 0 !important;
  cursor: pointer;
}
.filter-pill input {
  width: auto !important;
  margin: 0 !important;
  accent-color: var(--accent);
}
.chip-card {
  position: relative;
}
.favorite {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.chip-card-copy {
  display: block;
  color: var(--text);
}
.chip-card-copy:hover {
  text-decoration: none;
}
.chip-card-copy p {
  font-size: 10px;
  margin-top: 7px;
}
.chip-specs {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.chip-card-footer {
  padding: 11px 18px;
  font-size: 9px;
}
.chip-card-footer small {
  font-size: 8px;
  color: var(--dim);
}
.library-hero .actions {
  margin-top: 17px;
}
.learning-links .learn-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.learn-link strong {
  display: block;
  font-size: 10px;
}
.learn-link small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.learn-link > span {
  margin-left: auto;
}
.guide-card {
  color: var(--text);
  display: block;
}
.guide-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.stat strong.stat-text {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.hash {
  overflow-wrap: anywhere;
}
.decoder-fields {
  display: contents;
}
.decoder-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.waveform-footer label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}
.waveform-footer select {
  width: 75px;
  padding: 5px;
}
.waveform-footer input {
  min-width: 50px;
}
.error-text {
  color: var(--red);
  font-size: 12px;
  margin: 10px 0;
}
.event-list time {
  font-size: 9px;
  color: var(--dim);
}
.event-list li > span {
  display: none;
}
.event-list small {
  display: block;
  overflow-wrap: anywhere;
}
.search-results {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--surface2);
}
.search-result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}
.search-result:hover {
  background: var(--accent-soft);
}
.search-result strong {
  display: block;
  font: 11px JetBrains;
}
.search-result small {
  color: var(--muted);
  font-size: 10px;
}
.section-head > input {
  max-width: 240px;
}
.guide-body .diagram {
  margin-bottom: 20px;
}
.guide-body .notice {
  font-size: 12px;
}
.chip-meta div {
  min-width: 0;
}
.card > p + p {
  margin-top: 12px;
}
.card .form-grid {
  margin-top: 15px;
}
#analysis-panel > h2 + p {
  margin-top: 12px;
}
.library-hero h1 {
  margin: 8px 0 12px;
}
.chip-card-art:hover {
  text-decoration: none;
}
.chip-card-art:focus-visible {
  outline-offset: -3px;
}
.buffer-bar ~ .empty {
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}
.about-hero .programmer-art {
  width: 100%;
  height: 310px;
}
@media (max-width: 800px) {
  .decoder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .library-controls {
    display: block;
  }
  .filter-row > label {
    min-width: 130px;
  }
  .sidebar.open {
    box-shadow: 15px 0 45px #0008;
  }
  .waveform-footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 520px) {
  .decoder-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filter-row > label {
    min-width: 110px;
  }
  .library-controls .filter-pill {
    font-size: 9px;
  }
  .search-field {
    flex-wrap: wrap;
  }
  .search-field input {
    min-width: 100px;
  }
  .library-controls .search-field .button {
    padding: 8px;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .definition-list {
    grid-template-columns: 110px 1fr;
  }
  .chip-card-footer {
    flex-wrap: wrap;
  }
  .library-hero h1 {
    font-size: 28px;
  }
  .welcome-tags {
    flex-wrap: wrap;
  }
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-field input {
  flex: 1;
  min-width: 0;
}
.search-field > .icon {
  position: static;
  margin-left: 9px;
  flex-shrink: 0;
}
.search-field .button {
  margin: 0 5px 0 0;
}
.sidebar-close {
  display: none;
  position: absolute;
  right: 8px;
  top: 10px;
}
.chip-card-copy h3 {
  color: var(--text);
}
@media (max-width: 800px) {
  .sidebar-close {
    display: inline-flex;
  }
}
@media (min-width: 801px) {
  .library-controls > .search-field input {
    width: auto;
  }
}

#decoded-table {
  max-height: 440px;
  overflow: auto;
}
#decoded-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.programmer-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.simulator-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
}
.simulator-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 290px;
}
.simulator-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.simulator-mode img {
  width: 86px;
  height: 160px;
  display: block;
  border-radius: 8px;
  margin: 0 auto 22px;
  box-shadow: 0 8px 30px #0003;
}
.simulator-mode h3 {
  margin: 8px 0;
}
.sim-wiring {
  width: 100%;
  height: auto;
  background: #0f1422;
  border-radius: 12px;
}
.esp-log {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  max-height: 240px;
  overflow: auto;
  padding: 16px;
  background: var(--bg);
  border-radius: 10px;
}
#esp-progress {
  width: 100%;
  accent-color: var(--cyan);
  height: 6px;
}
#esp-details dd {
  overflow-wrap: anywhere;
}
#serial-scan .actions {
  max-height: 150px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .simulator-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .simulator-hero,
  .simulator-modes {
    grid-template-columns: 1fr;
  }
  .simulator-mode img {
    float: right;
    margin: 0 0 12px 18px;
  }
}

/* Digital timing instrument */
.instrument {
  overflow: visible;
}
.instrument .waveform-header {
  border-radius: 11px 11px 0 0;
  background: var(--surface2);
  padding: 16px 20px;
}
.scope-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.scope-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
}
.scope-tools select {
  width: auto;
  padding: 7px 24px 7px 9px;
  font-size: 11px;
}
.scope-tools input[type="checkbox"] {
  width: 14px;
  height: 14px;
}
.scope-body {
  --scope-height: 600px;
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
}
.scope-channels {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  height: var(--scope-height);
  overflow: auto;
  background: var(--surface2);
}
.scope-channel-heading {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 14px;
}
.scope-channels > select {
  font-size: 10px;
  padding: 8px;
  margin-bottom: 12px;
}
.scope-channel {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 6px;
  opacity: 0.6;
  --channel-color: var(--cyan);
}
.scope-channel[data-color="1"] {
  --channel-color: var(--accent);
}
.scope-channel[data-color="2"] {
  --channel-color: var(--amber);
}
.scope-channel[data-color="3"] {
  --channel-color: var(--red);
}
.scope-channel.enabled {
  opacity: 1;
  background: var(--bg);
}
.scope-channel label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--channel-color);
  margin: 0;
  font:
    11px JetBrains,
    monospace;
}
.scope-channel input[type="checkbox"] {
  accent-color: var(--channel-color);
  width: 13px;
  height: 13px;
  margin: 0;
}
.scope-channel input.channel-name {
  font:
    10px JetBrains,
    monospace;
  min-width: 0;
  width: 100%;
  padding: 6px 4px;
  background: transparent;
  border-color: transparent;
}
.scope-channel input.channel-name:focus {
  border-color: var(--channel-color);
}
.scope-plot {
  position: relative;
  min-width: 0;
}
.instrument .waveform {
  height: var(--scope-height);
  touch-action: none;
}
.instrument .waveform.pan-ready {
  cursor: grab;
}
.instrument .waveform.panning {
  cursor: grabbing;
}
.wave-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--text);
  color: var(--bg);
  padding: 7px 10px;
  font:
    10px JetBrains,
    monospace;
  border-radius: 5px;
  z-index: 2;
  max-width: 95%;
}
.wave-context {
  position: absolute;
  width: 240px;
  padding: 7px;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 36px #0004;
}
.wave-context button {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 5px;
  font:
    12px Manrope,
    sans-serif;
  cursor: pointer;
}
.wave-context button:hover,
.wave-context button:focus {
  background: var(--accent-soft);
}
.wave-context button:disabled {
  opacity: 0.4;
  cursor: default;
}
.wave-context-title {
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
  font:
    12px JetBrains,
    monospace;
}
.wave-context-title small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 10px;
}
.scope-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  color: var(--dim);
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.scope-inspector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.scope-inspector > section {
  padding: 20px;
  min-width: 0;
}
.scope-inspector > section + section {
  border-left: 1px solid var(--line);
}
.scope-inspector h3 {
  margin: 0;
  font-size: 13px;
}
.scope-inspector select {
  width: auto;
  padding: 6px 22px 6px 8px;
  font-size: 11px;
}
.scope-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  font:
    12px JetBrains,
    monospace;
}
.scope-metrics small {
  display: block;
  font:
    10px Manrope,
    sans-serif;
  color: var(--muted);
  margin-bottom: 5px;
}
.scope-metrics strong {
  font-weight: 500;
  color: var(--cyan);
}
.scope-metrics p {
  grid-column: 1/-1;
  font:
    12px/1.7 Manrope,
    sans-serif;
  color: var(--muted);
  margin: 0;
}
.scope-marker-list > div {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}
.scope-marker-list input {
  min-width: 50px;
  max-width: 150px;
  font:
    11px JetBrains,
    monospace;
  padding: 8px;
}
.scope-frame-link {
  color: var(--cyan);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}
.instrument .waveform-footer {
  flex-wrap: wrap;
  font-size: 10px;
}
.instrument .waveform-footer input {
  min-width: 100px;
}
@media (max-width: 800px) {
  .scope-body {
    grid-template-columns: 128px minmax(0, 1fr);
  }
  .scope-channel {
    flex-wrap: wrap;
  }
  .scope-channel input.channel-name {
    width: 95px;
  }
  .scope-inspector {
    grid-template-columns: 1fr;
  }
  .scope-inspector > section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 500px) {
  .scope-body {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .scope-channels {
    padding: 10px 5px;
  }
  .scope-channels .field-help {
    font-size: 9px;
  }
  .scope-channel input.channel-name {
    width: 75px;
  }
  .scope-channel-heading {
    font-size: 10px;
  }
  .scope-hints {
    font-size: 9px;
  }
  .scope-inspector > section {
    padding: 14px;
  }
  .wave-context {
    width: 205px;
  }
}
.simulator-page .field-help.mono {
  overflow-wrap: anywhere;
}
