:root {
  --bg: #eef2f6;
  --panel: #fff;
  --ink: #192a3f;
  --muted: #748195;
  --line: #e0e6ee;
  --blue: #236ce4;
  --cyan: #21cfb2;
  --dark: #101c2c;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    13px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 7px 11px;
  font-weight: 550;
  transition: 0.15s;
}
button:hover {
  background: #edf4ff;
  border-color: #b8ccef;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #42a1ff;
  outline-offset: 2px;
}
select,
input {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  padding: 6px 8px;
  max-width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--blue);
}
button.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
button.primary:hover {
  background: #155ac9;
}
header {
  height: 77px;
  background: #101c2c;
  display: flex;
  align-items: center;
  padding: 0 30px;
  color: #dce6f5;
  gap: 52px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.1;
}
.brand span:not(.chip) {
  color: #48d6bf;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2.1px;
  margin-top: 5px;
  color: #8b9eb5;
}
.chip {
  display: grid;
  place-items: center;
  background: #19394a;
  border: 1px solid #30706d;
  border-radius: 8px;
  font-size: 30px;
  width: 42px;
  height: 42px;
  color: #58ddc2;
}
nav {
  height: 100%;
  display: flex;
  gap: 20px;
}
.nav {
  background: none;
  border: 0;
  border-radius: 0;
  color: #a4b3c5;
  font-size: 13px;
  padding: 0 4px;
}
.nav.active {
  color: white;
  border-bottom: 3px solid var(--cyan);
}
.nav:hover {
  background: none;
  color: white;
}
.header-right {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: #94a9c0;
}
.version {
  margin-left: 15px;
  padding: 3px 8px;
  border: 1px solid #314054;
  border-radius: 4px;
}
.localdot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #35bb9a;
  border-radius: 50%;
}
main {
  max-width: 1800px;
  margin: auto;
  padding: 24px 28px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #6b829c;
  font-weight: 700;
}
h1 {
  margin: 5px 0 4px;
  font-size: 29px;
  font-weight: 620;
  letter-spacing: -0.9px;
}
.intro p {
  margin: 0;
  font-size: 12px;
  color: #6c7e93;
}
.engine {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 12px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24b493;
}
.dot.amber {
  background: #e4a246;
}
.toolbar {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 10px;
  flex-wrap: wrap;
}
.toolgroup {
  display: flex;
  gap: 7px;
  align-items: center;
}
.toolgroup label {
  color: var(--muted);
  font-size: 11px;
}
.toolgroup select {
  font-size: 12px;
}
.sep {
  height: 22px;
  width: 1px;
  background: var(--line);
  margin: 0 4px;
}
#ticks {
  min-width: 100px;
  text-align: right;
  font: 11px var(--mono);
  color: #5d708a;
}
.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px 12px;
  font: 11px var(--mono);
  color: #60758e;
}
#status {
  overflow-wrap: anywhere;
}
.statusbar.error {
  color: #c22f44;
}
.statusbar.running {
  color: #17866f;
}
#pcLabel {
  white-space: nowrap;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 1.04fr) minmax(425px, 1.45fr) minmax(
      210px,
      0.69fr
    );
  gap: 15px;
  align-items: stretch;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 6px #12253e03;
}
.panelhead {
  height: 48px;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
}
.panelhead > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.num {
  font: 10px var(--mono);
  color: #8d9bb0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}
.mini-actions {
  gap: 3px !important;
}
.mini-actions button {
  padding: 4px 6px;
  font-size: 10px;
  border-color: transparent;
  color: #6c7f95;
}
.examplebar {
  display: flex;
  padding: 10px;
  gap: 6px;
  background: #f8fafc;
}
.examplebar select {
  width: 100%;
  min-width: 0;
  font-size: 11px;
}
.examplebar button {
  padding: 5px 9px;
  font-size: 11px;
}
.tabbar {
  display: flex;
  gap: 16px;
  padding: 0 13px;
  background: #101c2c;
  border-bottom: 1px solid #25354a;
}
.tab {
  border: 0;
  background: none;
  color: #7f94ae;
  border-radius: 0;
  font-size: 11px;
  padding: 10px 0;
}
.tab:hover {
  background: none;
  color: #fff;
}
.tab.active {
  border-bottom: 2px solid #43d4b9;
  color: #e0e8f3;
}
#byteCount {
  font-size: 9px;
  color: #6d829b;
}
.sourcewrap {
  display: flex;
  height: 382px;
  background: #101c2c;
  overflow: hidden;
}
.sourcewrap pre {
  color: #425a78;
  text-align: right;
  padding: 14px 9px;
  margin: 0;
  font: 12px/22px var(--mono);
  background: #101c2c;
  width: 38px;
  min-width: 38px;
  overflow: hidden;
  user-select: none;
}
textarea#source {
  padding: 14px 12px 14px 2px;
  margin: 0;
  width: 100%;
  height: 100%;
  resize: none;
  background: #101c2c;
  border: none;
  outline: 0;
  color: #c1daf2;
  font: 12px/22px var(--mono);
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}
.machinewrap {
  height: 382px;
  overflow: auto;
  background: #101c2c;
}
.hint {
  color: #7c91ab;
  padding: 10px 12px;
  font-size: 10px;
  border-bottom: 1px solid #23374d;
}
.asmrow {
  display: flex;
  gap: 9px;
  font: 11px/24px var(--mono);
  padding: 0 10px;
  color: #d1deef;
  white-space: nowrap;
}
.asmrow button {
  padding: 0;
  border: 0;
  background: none;
  color: #6584ac;
  font: 10px var(--mono);
  width: 72px;
  text-align: left;
}
.asmrow .bytes {
  color: #6b829f;
  width: 92px;
  font-size: 10px;
}
.asmrow.current {
  background: #153b4b;
  border-left: 3px solid #3dd7b6;
  padding-left: 7px;
}
.asmrow.bp button {
  color: #ff8589;
}
.editorfoot {
  height: 34px;
  background: #142135;
  color: #728ba9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  font: 10px var(--mono);
}
.editorfoot button {
  padding: 3px 4px;
  background: none;
  border: 0;
  color: #96b7dd;
  font-size: 10px;
}
.example-description {
  padding: 11px 13px;
  font-size: 11px;
  color: #6b7d94;
  min-height: 66px;
}
.badge {
  font-size: 9px;
  letter-spacing: 0.2px;
  background: #e8f8f2;
  color: #168b70;
  border-radius: 4px;
  padding: 3px 6px;
}
.scope-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px;
  background: #f8fafc;
  font-size: 10px;
}
.scope-tools button {
  font-size: 10px;
  padding: 4px 7px;
}
.scope-tools label {
  margin-right: auto;
  display: flex;
  gap: 5px;
  align-items: center;
  color: #6d7d92;
}
.scope-tools select {
  font-size: 10px;
  padding: 4px;
}
.scope-area {
  display: flex;
  background: #0f1b2a;
  height: 223px;
  padding: 10px 10px 0 0;
}
.scope-area canvas {
  width: calc(100% - 79px);
  height: 213px;
  min-width: 0;
  cursor: crosshair;
}
#channelLabels {
  width: 79px;
  min-width: 79px;
  padding-top: 19px;
}
#channelLabels select {
  display: block;
  margin: 0 0 8px 8px;
  border: 0;
  background: #18283c;
  color: #49d3b8;
  padding: 2px 3px;
  font: 10px var(--mono);
  width: 63px;
  height: 22px;
}
.scope-readout {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #0f1b2a;
  color: #7d93af;
  font: 9px var(--mono);
  padding: 7px 11px 10px;
  border-top: 1px solid #1a2b40;
}
.triggerbar {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: #7e8da1;
}
.triggerbar select,
.triggerbar button {
  font-size: 10px;
  padding: 3px 5px;
}
.triggerbar span {
  margin-left: auto;
  font-size: 9px;
}
.ports-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 7px;
  font-size: 12px;
}
.segmented {
  display: flex;
  background: #f0f4f8;
  border-radius: 5px;
  padding: 2px;
}
.segmented button {
  padding: 3px 8px;
  border: 0;
  background: none;
  font-size: 10px;
  color: #7d8ca0;
}
.segmented button.active {
  background: #fff;
  color: #245fc1;
  box-shadow: 0 1px 4px #1232;
}
.pin-legend {
  display: flex;
  justify-content: space-between;
  padding: 0 13px;
  color: #8a96a6;
  font-size: 9px;
}
.pin-legend i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 3px;
}
.in-dot {
  background: #467ee5;
}
.out-dot {
  background: #22ad91;
}
.pins {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 10px 12px;
}
.pin {
  padding: 5px 0;
  border: 1px solid #dfe7f0;
  border-radius: 5px;
  background: #f6f9fc;
  text-align: center;
}
.pin b {
  display: block;
  font: 11px var(--mono);
  color: #7c90aa;
}
.pin .level {
  display: block;
  font: 15px/20px var(--mono);
  color: #a6b2c2;
}
.pin small {
  font-size: 8px;
  color: #93a1b4;
}
.pin.high {
  background: #e8f5fd;
  border-color: #72a9f0;
}
.pin.high b,
.pin.high .level {
  color: #2566c5;
}
.pin.output {
  border-color: #c0e5db;
  background: #f1faf7;
  cursor: default;
}
.pin.output.high {
  background: #dff6ee;
  border-color: #43c5a4;
}
.pin.output.high .level,
.pin.output b {
  color: #168d73;
}
.pin:disabled {
  opacity: 1;
  cursor: default;
}
.port-values {
  display: flex;
  gap: 12px;
  padding: 0 12px 10px;
  font: 9px var(--mono);
  color: #72839a;
}
.stimulus {
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.stimulus summary {
  padding: 10px 12px;
  cursor: pointer;
  color: #59718e;
  list-style: none;
}
.stimulus summary span {
  float: right;
}
.stimulus-body {
  padding: 0 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}
.stimulus-body input[type="number"] {
  width: 59px;
  padding: 3px;
  font-size: 10px;
}
.stimulus-body select {
  font-size: 10px;
  padding: 3px;
}
.wire {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding-top: 4px;
}
.registers .panelhead {
  padding: 0 12px;
}
.registers .panelhead select {
  font: 9px var(--mono);
  padding: 3px;
}
.flags {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.flag {
  border: 1px solid #e0e7ef;
  border-radius: 4px;
  font: 10px var(--mono);
  color: #9cacbd;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
}
.flag.on {
  background: #e8f1ff;
  color: #246cd8;
  border-color: #adcafb;
}
.flag b {
  font-size: 11px;
}
.reg-heading {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 0.3px;
  padding: 9px 12px 5px;
  color: #98a5b5;
}
.reg-heading span:last-child {
  font-size: 6px;
  letter-spacing: 0;
}
.regrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 13px;
  font: 11px/17px var(--mono);
  border-bottom: 1px solid #f1f4f8;
  cursor: text;
}
.regrow > span {
  color: #8492a6;
}
.regrow > strong {
  color: #354d6d;
  font-weight: 500;
}
.regrow.changed {
  background: #eef5ff;
}
.regrow.changed > strong {
  color: #2169d8;
}
.regrow.pc > span {
  color: #269d84;
}
.special {
  border-top: 1px solid var(--line);
}
.special summary {
  padding: 8px 12px;
  font-size: 10px;
  color: #73869e;
  cursor: pointer;
}
.special #fpuRegs {
  max-height: 280px;
  overflow: auto;
}
.cpu-note {
  font-size: 9px;
  color: #98a6b7;
  padding: 9px 12px;
}
.bottom {
  margin-top: 16px;
}
.bottomtabs {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  height: 44px;
}
.bottomtabs button {
  border: 0;
  border-radius: 0;
  font-size: 11px;
  background: none;
  padding: 13px 0;
  color: #7c8c9f;
}
.bottomtabs button.active {
  color: #216ce0;
  border-bottom: 2px solid #216ce0;
}
.bottomtabs > span {
  margin-left: auto;
  font: 9px var(--mono);
  color: #9aa7b7;
}
.bottomtabs b {
  margin: 0 7px;
  font-weight: 400;
}
.bottomcontent {
  display: flex;
  min-height: 240px;
}
.memorymap {
  width: 250px;
  flex-shrink: 0;
  background: #fbfcfe;
  padding: 14px;
  border-right: 1px solid var(--line);
}
h3 {
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 10px;
}
.memorymap button {
  display: flex;
  align-items: center;
  padding: 7px 0;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  gap: 8px;
  font-size: 10px;
}
.memorymap button i {
  height: 28px;
  width: 3px;
  border-radius: 4px;
  background: #aebbd1;
}
.memorymap button i.flash {
  background: #737ee5;
}
.memorymap button i.ram {
  background: #43b9a1;
}
.memorymap button i.gpio {
  background: #e6ac5e;
}
.memorymap button i.uart {
  background: #6e9bdd;
}
.memorymap small {
  display: block;
  color: #93a1b3;
  font: 8px var(--mono);
  margin-top: 3px;
}
.memorymap em {
  margin-left: auto;
  font: 8px var(--mono);
  color: #a3afbe;
}
.memoryview {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
}
.mem-controls {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
}
.mem-controls input {
  width: 117px;
  font: 11px var(--mono);
  padding: 4px;
}
.mem-controls button {
  font-size: 10px;
  padding: 4px 7px;
}
.mem-controls > span {
  margin-left: auto;
  color: #a0acbd;
  font-size: 9px;
}
.hexview {
  font: 10px/22px var(--mono);
  overflow: auto;
  padding-top: 10px;
  white-space: nowrap;
}
.hexrow {
  display: flex;
  gap: 0;
  align-items: center;
}
.hexrow > span {
  width: 76px;
  flex-shrink: 0;
  color: #7290b1;
}
.hexrow .byte {
  font: 10px var(--mono);
  padding: 2px 3px;
  min-width: 23px;
  border: 0;
  background: none;
  border-radius: 3px;
  color: #91a0b2;
}
.hexrow .byte.nonzero {
  color: #2b6dce;
  background: #f0f6ff;
}
.hexrow .ascii {
  margin-left: 12px;
  color: #8399b1;
  letter-spacing: 1px;
  font-size: 9px;
}
.stackview {
  width: 220px;
  padding: 13px;
  border-left: 1px solid var(--line);
  background: #fbfcfe;
}
.stackhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.stackhead h3 {
  margin: 0;
}
.stackhead select {
  font: 10px var(--mono);
  padding: 3px;
}
.stackrow {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  font: 10px/23px var(--mono);
  color: #8499b3;
  padding: 0 5px;
}
.stackrow.top {
  background: #e9f3ff;
  color: #2169ce;
  border-radius: 4px;
}
.stackview > small {
  display: block;
  font-size: 8px;
  color: #a2aebe;
  margin-top: 7px;
}
.terminal {
  display: block;
  padding: 14px 18px;
}
.terminaltop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #8d9db1;
}
.terminaltop button {
  font-size: 10px;
  padding: 4px 8px;
}
#terminalOutput {
  margin: 10px 0;
  background: #101c2c;
  color: #4dd6b9;
  min-height: 110px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 12px;
  font: 12px/20px var(--mono);
}
#serialForm {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 11px var(--mono);
}
#serialForm input {
  flex: 1;
  min-width: 80px;
}
#serialForm button,
#serialForm select {
  font-size: 11px;
}
.terminal > small {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  color: #8c9eb3;
}
#eventLog {
  padding: 14px 18px;
  width: 100%;
  max-height: 260px;
  overflow: auto;
  font: 11px/24px var(--mono);
  color: #687f9b;
}
#eventLog b {
  color: #2c72cb;
  margin-right: 20px;
  font-weight: 400;
}
footer {
  padding: 16px 2px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #94a2b5;
  font-size: 10px;
}
footer > span {
  margin-right: auto;
}
footer button {
  padding: 0;
  background: none;
  border: 0;
  color: #607d9e;
  font-size: 10px;
}
footer a {
  color: #607d9e;
  text-decoration: none;
}
dialog {
  border: 1px solid #ccd7e5;
  border-radius: 12px;
  box-shadow: 0 30px 100px #0004;
  padding: 0;
  color: var(--ink);
  max-width: 780px;
  width: calc(100vw - 36px);
}
dialog::backdrop {
  background: #0c1c33a8;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  margin: 3px 0;
}
.guidebody {
  padding: 16px 26px 25px;
  max-height: 70vh;
  overflow: auto;
  line-height: 1.8;
  color: #5b6f89;
}
.guidebody h3 {
  font-size: 14px;
  color: #263f61;
  margin: 17px 0 6px;
}
.guidebody p {
  margin: 8px 0;
}
.guidebody table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
.guidebody td,
.guidebody th {
  border-bottom: 1px solid var(--line);
  padding: 7px;
  text-align: left;
}
#editDialog {
  max-width: 400px;
  padding: 24px;
}
#editDialog h3 {
  font-size: 16px;
}
#editDialog input {
  width: 100%;
  font-family: var(--mono);
}
#editDialog p {
  font-size: 11px;
  color: #8597ad;
}
#editDialog form > div {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  .sourcewrap,
  .machinewrap {
    height: 410px;
  }
  .scope-area {
    height: 246px;
  }
  .scope-area canvas {
    height: 236px;
  }
  #channelLabels select {
    margin-bottom: 12px;
  }
  .regrow {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .pins {
    gap: 8px;
  }
  .hexrow .byte {
    min-width: 29px;
  }
  .stackview {
    width: 245px;
  }
}
@media (max-width: 1200px) {
  main {
    padding: 20px 16px;
  }
  .workspace {
    grid-template-columns: minmax(280px, 1fr) minmax(390px, 1.3fr);
  }
  .registers {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 160px 1fr 220px;
  }
  .registers .panelhead {
    height: auto;
    grid-row: 1/3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }
  .flags {
    grid-column: 3;
    grid-row: 1;
  }
  .reg-heading {
    display: none;
  }
  #regs {
    grid-column: 2;
    grid-row: 1/4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 10px;
  }
  .regrow {
    padding: 6px 8px;
    font-size: 10px;
  }
  .special {
    grid-column: 3;
  }
  .cpu-note {
    grid-column: 1;
    font-size: 8px;
  }
  .memorymap {
    width: 210px;
  }
  .stackview {
    width: 190px;
  }
  .hexrow .byte {
    min-width: 19px;
    font-size: 9px;
  }
  .mem-controls > span {
    display: none;
  }
}
@media (max-width: 850px) {
  header {
    padding: 0 18px;
    gap: 26px;
  }
  .header-right {
    display: none;
  }
  .intro {
    gap: 12px;
  }
  .engine {
    font-size: 9px;
    max-width: 180px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .registers {
    grid-column: 1;
  }
  .instruments {
    grid-row: 2;
  }
  .bottomcontent {
    flex-wrap: wrap;
  }
  .memorymap {
    width: 100%;
    display: flex;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
  }
  .memorymap h3 {
    width: 100%;
    margin-bottom: 0;
  }
  .memorymap button {
    width: auto;
    flex: 1;
  }
  .memorymap small {
    font-size: 7px;
  }
  .memoryview {
    min-width: 65%;
  }
  .stackview {
    width: 30%;
  }
  .bottomtabs > span {
    display: none;
  }
  h1 {
    font-size: 25px;
  }
  .toolbar .toolgroup {
    flex-wrap: wrap;
  }
  .registers {
    grid-template-columns: 120px 1fr;
  }
  .registers .panelhead {
    grid-row: 1;
    grid-column: 1;
  }
  .flags {
    grid-column: 1;
    grid-row: 2;
    flex-wrap: wrap;
  }
  .special {
    grid-column: 1/-1;
  }
  .cpu-note {
    grid-column: 1/-1;
  }
  #regs {
    grid-template-columns: repeat(2, 1fr);
  }
  footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  footer > span {
    width: 100%;
  }
  .sourcewrap,
  .machinewrap {
    height: 350px;
  }
  .scope-tools {
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  main {
    padding: 16px 10px;
  }
  .intro {
    display: block;
  }
  .engine {
    margin-top: 10px;
    max-width: none;
    width: max-content;
  }
  .scope-tools label {
    margin-right: 0;
  }
  .triggerbar {
    flex-wrap: wrap;
  }
  .triggerbar span {
    width: 100%;
    margin: 2px 0 0;
  }
  .memoryview {
    width: 100%;
    padding: 12px;
  }
  .stackview {
    width: 100%;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .memorymap button {
    min-width: 45%;
  }
  .header-right {
    display: none;
  }
  .brand {
    font-size: 20px;
  }
  header {
    gap: 20px;
  }
  nav {
    gap: 15px;
  }
  .nav {
    font-size: 11px;
  }
  .toolgroup button {
    font-size: 11px;
  }
  .port-values {
    font-size: 8px;
    gap: 8px;
  }
  .scope-readout {
    font-size: 8px;
  }
  .bottomtabs {
    gap: 18px;
  }
  .bottomtabs button {
    font-size: 10px;
  }
  .hexrow .byte {
    min-width: 17px;
    font-size: 8px;
    padding: 2px;
  }
  .hexrow > span {
    width: 65px;
  }
  .hexrow .ascii {
    display: none;
  }
}
/* Assembly IDE v2: project tools and debugger workspaces. */
.target-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
  border: 1px solid #d9e4f0;
  border-radius: 8px;
  background: #f7fbff;
  font-size: 11px;
}
.target-strip > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.target-chip {
  font-size: 22px;
  color: #317de3;
}
.target-strip strong {
  color: #1f4e87;
}
.target-strip #targetSummary {
  font: 10px var(--mono);
  color: #758ca5;
}
.target-strip button {
  font-size: 10px;
  padding: 4px 6px;
  white-space: nowrap;
}
.intro {
  margin-bottom: 16px;
}
.toolbar {
  gap: 7px;
}
.toolbar .toolgroup {
  flex-wrap: wrap;
}
.toolbar button {
  font-size: 11px;
  padding: 7px 9px;
}
#device {
  font-size: 11px;
  max-width: 205px;
}
.toolbar #ticks {
  min-width: 85px;
}
.projectbar {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.project-title {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
}
.project-title > span {
  font-size: 17px;
  color: #7392b8;
}
.project-title input {
  min-width: 80px;
  width: 100%;
  background: none;
  border: 0;
  padding: 3px;
  font-size: 11px;
  font-weight: 600;
}
.project-title button {
  padding: 4px 6px;
  white-space: nowrap;
  font-size: 9px;
}
.filetabs {
  display: flex;
  gap: 3px;
  padding: 0 10px;
  overflow-x: auto;
}
.filetab {
  padding: 5px 9px;
  border-radius: 5px 5px 0 0;
  font: 10px var(--mono);
  border-color: transparent;
  background: transparent;
  color: #8194ae;
  white-space: nowrap;
}
.filetab.active {
  background: #e7f0ff;
  color: #2d6dd0;
  border-color: #d3e2f7;
  border-bottom-color: transparent;
}
.file-actions {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  gap: 7px;
}
.file-actions button {
  padding: 0;
  font-size: 9px;
  border: 0;
  background: none;
  color: #7b8fa9;
}
.file-actions label {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  font-size: 9px;
  color: #8fa1b7;
}
.file-actions select {
  font-size: 9px;
  padding: 2px 4px;
  max-width: 100px;
}
.examplebar {
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
}
.editor-search {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #152337;
  border-bottom: 1px solid #283a51;
}
.editor-search input {
  width: 85px;
  min-width: 40px;
  flex: 1;
  background: #1b2d44;
  border-color: #30445e;
  color: #ccddf1;
  padding: 4px 5px;
  font: 9px var(--mono);
}
.editor-search input::placeholder {
  color: #7790b2;
}
.editor-search button {
  font-size: 9px;
  padding: 3px 5px;
  background: #1a2a40;
  color: #9bb9dd;
  border-color: #314760;
  white-space: nowrap;
}
.follow {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #142135;
  color: #87a2c3;
  font-size: 9px;
  padding: 4px 10px;
  border-bottom: 1px solid #263a54;
}
.follow input {
  width: 10px;
  height: 10px;
  margin: 0;
}
.follow span {
  margin-left: auto;
  color: #55c7b2;
  font: 9px var(--mono);
}
.sourcewrap {
  height: 360px;
}
.sourcewrap #lines {
  min-width: 38px;
  width: 38px;
  background: #101c2c;
  padding: 14px 0;
  overflow: hidden;
  user-select: none;
}
.source-line {
  display: block;
  width: 100%;
  height: 22px;
  min-height: 22px;
  border: 0;
  padding: 0 8px 0 0;
  text-align: right;
  background: none;
  color: #526e91;
  border-radius: 0;
  font: 11px/22px var(--mono);
}
.source-line.executing {
  background: #16493e;
  color: #6bf0cc;
}
.source-line.has-bp {
  color: #ff8d9a;
  background: #49283a;
}
.source-line.has-bp:before {
  content: "●";
  margin-right: 3px;
  color: #ff617b;
  font-size: 7px;
}
.source-line:hover {
  background: #223750;
  color: #b8d7ff;
}
.machinewrap {
  height: 400px;
}
.example-description {
  min-height: 65px;
}
.scope-area {
  height: 286px;
}
.scope-area canvas {
  height: 276px;
}
#channelLabels {
  padding-top: 19px;
}
#channelLabels select {
  margin-bottom: 19px;
  height: 22px;
}
.ports-head {
  align-items: flex-start;
  gap: 8px;
}
.ports-head > strong {
  white-space: nowrap;
  padding-top: 6px;
}
.segmented {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  max-width: 75%;
}
.segmented button {
  padding: 4px 7px;
}
.pin.unavailable {
  background: #f5f5f6;
  border-style: dashed;
  opacity: 0.5;
}
.pin.unavailable b {
  color: #a5a8ad;
}
.port-values {
  font-size: 9px;
  white-space: pre-wrap;
}
.memorymap {
  max-height: 292px;
  overflow-y: auto;
}
.memorymap button {
  font-size: 9px;
}
.memorymap small {
  font-size: 8px;
}
.bottomtabs {
  gap: 20px;
  overflow-x: auto;
  white-space: nowrap;
}
.bottomtabs button {
  font-size: 10px;
  flex-shrink: 0;
}
.bottomtabs > span {
  font-size: 8px;
  flex-shrink: 0;
}
.debugger-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  min-height: 260px;
}
.debugger-grid > div {
  padding: 17px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.debugger-grid h3,
.build-grid h3,
.trace-grid h3 {
  font-size: 12px;
}
.debugger-grid small {
  display: block;
  margin-top: 12px;
  font-size: 9px;
  color: #99a9bb;
}
.inlineform {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.inlineform input {
  width: 100%;
  min-width: 0;
  font: 11px var(--mono);
}
.inlineform button {
  padding: 5px 8px;
  font-size: 11px;
}
.watchrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f6;
  font-size: 10px;
}
.watchrow code {
  max-width: 45%;
  overflow-wrap: anywhere;
  color: #4b6a91;
  font-size: 10px;
}
.watchrow > span {
  margin-left: auto;
  font: 9px var(--mono);
  color: #376eae;
}
.watchrow.changed {
  background: #eaf3ff;
}
.watchrow button,
.breakrow button {
  padding: 0 4px;
  font-size: 12px;
  border: 0;
  background: transparent;
  color: #9aacc1;
}
.breakform {
  display: grid;
  grid-template-columns: 1.2fr 1fr 45px 58px;
  gap: 5px;
  margin-bottom: 9px;
}
.breakform input,
.breakform select {
  width: 100%;
  min-width: 0;
  font-size: 10px;
  padding: 5px;
}
.breakform button {
  padding: 4px;
  font-size: 10px;
}
.breakrow {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #edf1f6;
  font: 9px var(--mono);
}
.breakrow input {
  width: 11px;
  height: 11px;
  margin: 0;
}
.breakrow > span {
  color: #7c91aa;
  margin-left: auto;
  max-width: 50%;
  overflow-wrap: anywhere;
}
.breakrow code {
  color: #2d6bb5;
}
.error-note {
  color: #c05061 !important;
  font-size: 10px;
}
.peripheral-panel {
  display: block;
  padding: 16px 18px;
}
.peripheral-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.peripheral-toolbar h3 {
  margin: 0;
  font-size: 12px;
}
.peripheral-toolbar select {
  font-size: 11px;
}
.peripheral-toolbar > span {
  font: 10px var(--mono);
  color: #8196af;
}
.peripheral-toolbar > span:last-child {
  margin-left: auto;
  font-size: 9px;
}
.peripheral-table {
  width: 100%;
  border-collapse: collapse;
  font: 11px var(--mono);
}
.peripheral-table th {
  text-align: left;
  font:
    9px -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0.5px;
  color: #9aabc0;
  padding: 7px;
  border-bottom: 1px solid var(--line);
}
.peripheral-table td {
  padding: 7px;
  border-bottom: 1px solid #edf1f6;
  color: #4e6e96;
}
.peripheral-table .regvalue {
  font-weight: 600;
  color: #216cd5;
  cursor: text;
}
.bitcells {
  white-space: nowrap;
  min-width: 320px;
}
.bitcells button {
  width: 12px;
  min-width: 12px;
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  background: #f2f5f9;
  color: #b1bfd1;
  font: 9px var(--mono);
}
.bitcells button:nth-child(4n) {
  margin-right: 3px;
}
.bitcells button.set {
  color: #1d77cb;
  background: #dfedfe;
}
.bitcells button:disabled {
  cursor: default;
  opacity: 0.8;
}
.peripheral-note {
  margin-top: 13px;
  font-size: 10px;
  color: #8a9db6;
  line-height: 1.7;
}
.trace-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
}
.trace-grid > section {
  padding: 17px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.trace-grid h3 span {
  font-size: 9px;
  font-weight: 400;
  color: #9aaac0;
}
.tracehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tracehead h3 {
  margin: 0;
}
.tracehead button {
  font-size: 10px;
  padding: 4px 7px;
}
#callStack {
  font: 10px/20px var(--mono);
  color: #8c9eb5;
  margin-bottom: 18px;
  max-height: 100px;
  overflow: auto;
}
.callframe {
  color: #366da7;
  padding: 5px;
  background: #eef5ff;
  border-bottom: 2px solid white;
}
.coverrow {
  font: 10px/20px var(--mono);
  color: #6d85a6;
}
#coverageSummary {
  font-size: 10px;
  color: #899bb3;
  margin-bottom: 7px;
}
#coverageList {
  max-height: 120px;
  overflow: auto;
}
#instructionTrace {
  max-height: 255px;
  overflow: auto;
}
.tracerow {
  display: grid;
  grid-template-columns: 50px 75px minmax(120px, 1fr) 1.2fr;
  gap: 8px;
  font: 10px/23px var(--mono);
  border-bottom: 1px solid #edf1f6;
}
.tracerow > span:first-child {
  color: #9aabc0;
}
.tracerow code {
  color: #2574c9;
}
.tracerow small {
  font-size: 9px;
  color: #8199b8;
  overflow-wrap: anywhere;
  line-height: 1.5;
  padding-top: 5px;
}
.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.build-grid > section {
  padding: 17px;
  min-width: 0;
}
.build-grid > section + section {
  border-left: 1px solid var(--line);
}
.build-grid pre {
  min-height: 150px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  background: #101c2c;
  color: #9bb7d8;
  padding: 12px;
  font: 11px/20px var(--mono);
  margin: 10px 0;
}
.build-grid .inlineform {
  margin-bottom: 0;
}
.build-grid .inlineform > span {
  color: #35b99f;
  font-size: 20px;
}
.mono {
  font-family: var(--mono);
}
#fileDialog {
  max-width: 450px;
  padding: 24px;
}
#fileDialog h3 {
  font-size: 16px;
}
#fileDialog input {
  width: 100%;
  font: 12px var(--mono);
}
#fileDialog p {
  font-size: 11px;
  color: #849bb8;
}
#fileDialog form > div {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
#referenceLinks a {
  display: inline-block;
  margin: 0 14px 6px 0;
  color: #2673ce;
  font-size: 11px;
}
#peripheralRegisters {
  overflow-x: auto;
}
#buildOutput {
  color: #72ccb8;
}
.guidebody code {
  background: #edf3fb;
  color: #3d71b0;
  padding: 2px 4px;
}
@media (min-width: 1550px) {
  .scope-area {
    height: 310px;
  }
  .scope-area canvas {
    height: 300px;
  }
  #channelLabels select {
    margin-bottom: 23px;
  }
  .sourcewrap {
    height: 390px;
  }
  .machinewrap {
    height: 430px;
  }
}
@media (max-width: 1200px) {
  .debugger-grid {
    grid-template-columns: 1fr 1fr;
  }
  .data-break-section {
    grid-column: 1/-1;
  }
  .bottomtabs > span {
    display: none;
  }
  .target-strip #targetSummary {
    font-size: 9px;
  }
  .tracerow {
    grid-template-columns: 45px 70px 1fr;
  }
  .tracerow small {
    grid-column: 2/4;
  }
  .bitcells button {
    width: 11px;
  }
  .sourcewrap {
    height: 370px;
  }
  .machinewrap {
    height: 410px;
  }
}
@media (max-width: 850px) {
  .target-strip {
    align-items: flex-start;
  }
  .target-strip > div {
    gap: 5px 10px;
  }
  .target-strip #targetSummary {
    width: 100%;
    padding-left: 28px;
  }
  .target-strip button {
    font-size: 9px;
  }
  .debugger-grid {
    display: block;
  }
  .debugger-grid > div {
    border-bottom: 1px solid var(--line);
  }
  .trace-grid,
  .build-grid {
    grid-template-columns: 1fr;
  }
  .build-grid > section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .peripheral-toolbar {
    flex-wrap: wrap;
  }
  .peripheral-toolbar > span:last-child {
    margin-left: 0;
    width: 100%;
  }
  .bottomtabs {
    gap: 18px;
  }
  .memorymap {
    max-height: 190px;
  }
  .sourcewrap {
    height: 360px;
  }
  .target-strip #targetSummary {
    line-height: 1.7;
  }
}
