:root {
  color-scheme: dark;
  --bg: #0e141d;
  --panel: #131c27;
  --raised: #1a2635;
  --line: #273344;
  --text: #dfe7f0;
  --muted: #8496aa;
  --accent: #7de4c4;
  --violet: #a89bfa;
  --left: 246px;
  --right: 290px;
  --console: 176px;
  --debug: 300px;
  font:
    12px/1.5 Inter,
    Segoe UI,
    system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}
.ide-app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: var(--text);
  background: #202d3c;
  border: 1px solid #344255;
  border-radius: 5px;
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover:not(:disabled) {
  background: #2d3d50;
  border-color: #53647b;
}
button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
button[aria-pressed="true"] {
  background: #263c3e;
  color: var(--accent);
  border-color: #416b64;
}
button.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
button.quiet:hover {
  color: var(--text);
  background: var(--raised);
}
button.icon-button {
  padding: 4px 7px;
  min-width: 28px;
  background: transparent;
  border-color: transparent;
  font-size: 15px;
  line-height: 20px;
}
kbd {
  font:
    10px Consolas,
    monospace;
  color: var(--muted);
  margin-left: 10px;
}
a {
  color: var(--accent);
}
input,
select,
textarea {
  border: 1px solid #344255;
  background: #0f1823;
  color: var(--text);
  padding: 7px 9px;
  border-radius: 5px;
  min-width: 0;
  max-width: 100%;
}
input::placeholder {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
p {
  margin: 8px 0;
}
.subtle {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.wide {
  width: 100%;
}
.primary {
  background: var(--accent);
  color: #102d29;
  border-color: var(--accent);
  font-weight: 650;
}
.primary:hover:not(:disabled) {
  background: #a3f2d9;
  color: #102d29;
}
.primary kbd {
  color: var(--muted);
}
.danger {
  color: #f99eab;
}
.pill {
  display: inline-block;
  font:
    10px/1.4 Consolas,
    monospace;
  padding: 3px 6px;
  border: 1px solid #364655;
  border-radius: 4px;
  color: var(--accent);
  white-space: nowrap;
}
.appbar {
  height: 52px;
  flex: none;
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: #141d29;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 29px;
  background: linear-gradient(145deg, #447c71, #244d52);
  border: 1px solid #548f7b;
  border-radius: 7px;
  color: #b9ffe6;
  font: 24px Consolas;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.local {
  margin-left: auto;
  font-size: 10px;
  white-space: nowrap;
  color: var(--muted);
}
.local i,
.build-sidebar-foot i,
.console-header i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}
.studio {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: min(var(--left), 28vw) 4px minmax(180px, 1fr) 4px min(
      var(--right),
      30vw
    );
  grid-template-rows: minmax(0, 1fr) 4px var(--console);
  overflow: hidden;
}
.explorer {
  grid-column: 1;
  grid-row: 1/4;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.section-title {
  min-height: 42px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #a5b4c7;
  font-size: 9px;
  letter-spacing: 1.3px;
  font-weight: 650;
}
.root-bar {
  padding: 0 10px 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  border-bottom: 1px solid var(--line);
}
.root-button {
  flex: 1;
  text-align: left;
  font-size: 11px;
}
.root-bar > span {
  display: block;
  width: 100%;
  font:
    10px/1.4 Consolas,
    monospace;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px;
}
.project-picker {
  padding: 13px 10px 10px;
}
.project-picker label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.project-picker > div {
  display: flex;
  gap: 3px;
}
.project-picker select {
  width: 100%;
  background: #202d3b;
  color: #edf1f7;
  font-weight: 550;
}
.files-title {
  border-top: 1px solid var(--line);
  padding: 6px 9px;
  min-height: 34px;
}
.inline-actions {
  display: flex;
  align-items: center;
  gap: 0;
}
.inline-actions button {
  font-size: 13px !important;
  padding: 2px 5px !important;
  min-width: 23px !important;
}
.file-search {
  margin: 0 10px 8px;
  position: relative;
}
.file-search input {
  width: 100%;
  font-size: 11px;
  padding-right: 35px;
}
.file-search kbd {
  position: absolute;
  right: 8px;
  top: 7px;
  pointer-events: none;
}
.menu {
  position: relative;
  letter-spacing: 0;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 12px;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu[open] summary,
.menu summary:hover {
  background: var(--raised);
  color: var(--text);
}
.menu-items {
  position: absolute;
  top: 100%;
  right: 0;
  width: max-content;
  min-width: min(205px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  background: #202c3a;
  border: 1px solid #445165;
  border-radius: 6px;
  box-shadow: 0 12px 30px #0007;
}
.action-group > summary { cursor: pointer; padding: 6px 10px; }
.action-group > summary::before { content: "▸ "; }
.action-group[open] > summary::before { content: "▾ "; }
.action-group > button:not([hidden]), .action-group > #root-path { display: block; width: 100%; padding-left: 22px; }
.menu-items:has(.action-group) { max-height: 65vh; overflow-y: auto; }
.menu-items button {
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 11px;
}
.explorer .menu-items {
  position: fixed;
  top: 91px;
  left: 18px;
  right: auto;
}
.files-title .menu-items {
  top: 266px;
}
#file-tree {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 3px 0 15px;
  scrollbar-width: thin;
  font:
    12px/1.5 Segoe UI,
    system-ui;
}
#file-tree .tree-root {
  font-size: 10px;
  font-weight: 650;
  color: #a7b7c9;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 6px 12px;
}
#file-tree details {
  margin: 0;
}
#file-tree summary {
  white-space: nowrap;
  padding-top: 5px;
  padding-bottom: 5px;
  color: #b9c8d9;
  cursor: pointer;
  list-style: none;
}
#file-tree summary:before {
  content: "›";
  display: inline-block;
  transform: rotate(0);
  width: 14px;
  color: var(--muted);
}
#file-tree details[open] > summary:before {
  transform: rotate(90deg);
}
#file-tree summary:after {
  content: " /";
  color: var(--muted);
  font-size: 10px;
}
#file-tree button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: none;
  padding-top: 5px;
  padding-bottom: 5px;
  white-space: nowrap;
  font: inherit;
  color: #aebed0;
}
#file-tree button:before {
  content: "◇";
  width: 21px;
  display: inline-block;
  color: var(--muted);
  font-size: 10px;
}
#file-tree button[data-ext="cpp"]:before,
#file-tree button[data-ext="c"]:before {
  content: "C";
  color: #7dcdf1;
}
#file-tree button[data-ext="hpp"]:before,
#file-tree button[data-ext="h"]:before {
  content: "H";
  color: #b6a5ed;
}
#file-tree button[data-ext="s"]:before {
  content: "S";
  color: #dfb37f;
}
#file-tree button:hover {
  background: #1b2c3d;
}
#file-tree button.selected {
  background: #253c48;
  color: #e5f7f6;
  box-shadow: inset 2px 0 var(--accent);
}
#file-tree button.binary-file {
  opacity: 0.5;
}
.explorer-foot {
  padding: 9px 11px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
#tree-empty {
  padding: 16px;
  color: var(--muted);
}
.splitter {
  background: #202d3c;
  touch-action: none;
  z-index: 5;
}
.splitter:hover,
.splitter.dragging,
.splitter:focus {
  background: var(--accent);
}
.vertical {
  cursor: col-resize;
  grid-row: 1;
}
.horizontal {
  cursor: row-resize;
  min-height: 4px;
  flex: none;
}
#resize-left {
  grid-column: 2;
  grid-row: 1/4;
}
#resize-right {
  grid-column: 4;
}
#resize-console {
  grid-column: 3/6;
  grid-row: 2;
}
.editor-column {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #101b25;
  overflow: hidden;
}
.editor-top {
  height: 39px;
  flex: none;
  display: flex;
  align-items: stretch;
  background: #111a25;
  border-bottom: 1px solid #263746;
}
#file-tabs {
  display: flex;
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
}
.file-tab {
  display: flex;
  align-items: center;
  border-right: 1px solid #293643;
  flex: none;
  border-top: 2px solid transparent;
}
.file-tab.active {
  background: #101b25;
  border-top-color: var(--accent);
}
.file-tab > button {
  height: 35px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font:
    11px Consolas,
    monospace;
  padding: 6px 10px;
  color: #9bacbf;
}
.file-tab.active > button {
  color: #edf5fa;
}
.file-tab > .tab-close {
  padding: 5px 7px;
  color: var(--muted);
}
.file-tab .file-icon {
  color: #88d7dc;
  font-size: 10px;
  margin-right: 7px;
}
.file-tab.dirty .tab-close {
  color: var(--accent);
}
.editor-lang {
  align-self: center;
  font: 9px Consolas;
  color: var(--muted);
  padding: 0 12px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 29px;
  padding: 0 15px;
  color: var(--muted);
  font: 10px Consolas;
  flex: none;
  border-bottom: 1px solid #1c2d3a;
}
.breadcrumbs > span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-wrap {
  position: relative;
  flex: 1;
  min-height: 80px;
  overflow: hidden;
}
#editor {
  width: 100%;
  height: 100%;
  padding: 0;
}
#editor-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #101b25;
  color: var(--muted);
}
.empty-mark {
  font: 50px Consolas;
  color: var(--muted);
}
#editor-empty h2 {
  font-size: 18px;
  font-weight: 450;
  margin: 15px 0 0;
}
#editor-empty p {
  margin: 5px;
}
#editor-empty small {
  margin-top: 14px;
  font-size: 10px;
}
.monaco-editor textarea {
  padding: 0;
}
.monaco-editor .suggest-widget {
  z-index: 1000;
}
.build-sidebar {
  grid-column: 5;
  grid-row: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  scrollbar-width: thin;
}
.target {
  margin: 0 14px 15px;
  padding: 12px 13px;
  background: linear-gradient(120deg, #1d303b, #1b2635);
  border: 1px solid #344653;
  border-radius: 7px;
}
.target > span {
  font-size: 8px;
  color: #78a9a5;
  letter-spacing: 1.4px;
}
.target strong {
  display: block;
  font:
    16px/1.9 Consolas,
    monospace;
  color: #e2f4f1;
}
.target small {
  font-size: 10px;
  color: #849fb3;
}
.build-section {
  padding: 15px 14px;
  border-top: 1px solid var(--line);
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.section-label b {
  font-size: 11px;
  font-weight: 600;
}
.section-label em {
  font: 10px Consolas;
  color: var(--muted);
  font-style: normal;
  margin-right: 7px;
}
.build-section label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.build-section .wide {
  margin: 3px 0;
  padding: 9px 7px;
}
#status {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 15px;
  overflow-wrap: anywhere;
}
.build-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.build-result strong {
  color: #d7e4ee;
  font: 19px Consolas;
  margin-right: 3px;
}
.meter {
  background: #2b3b4e;
  height: 4px;
  margin-top: 7px;
  border-radius: 4px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}
#memory-info {
  font-size: 9px;
  color: var(--muted);
  margin: 6px 0 12px;
}
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font: 10px Consolas;
}
.downloads a {
  padding: 5px 8px;
  border: 1px solid #3b4c60;
  border-radius: 4px;
  text-decoration: none;
  color: #a6c2d6;
}
.downloads a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.upload-button {
  color: #b7caef;
  border-color: #4b587b;
  background: #25334a;
}
#probe-info {
  margin: 7px 0 13px;
  overflow-wrap: anywhere;
}
.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748a;
}
.build-sidebar-foot {
  margin-top: auto;
  padding: 15px;
  font-size: 10px;
  color: var(--muted);
}
.build-sidebar-foot span {
  display: block;
  font-size: 9px;
  margin-top: 4px;
  color: var(--muted);
}
progress {
  width: 100%;
  accent-color: var(--accent);
}
.console-panel {
  grid-column: 3/6;
  grid-row: 3;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0d1620;
  overflow: hidden;
}
.console-header {
  height: 34px;
  flex: none;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.9px;
}
.console-header small {
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 12px;
}
.console-header > div {
  display: flex;
  gap: 4px;
}
.console-header button {
  font-size: 10px;
}
#log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 10px 14px;
  font:
    11px/1.7 Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #9aafc1;
}
.statusbar {
  flex: none;
  height: 25px;
  background: #182b35;
  color: #91b9bc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font: 10px Consolas;
  padding: 0 12px;
  border-top: 1px solid #29434e;
  white-space: nowrap;
}
.status-left {
  display: flex;
  gap: 15px;
  color: #74d7bd;
}
#intellisense-status {
  overflow: hidden;
  text-overflow: ellipsis;
}
.statusbar > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.debug-dock {
  height: var(--debug);
  max-height: 56%;
  min-height: 140px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: #111d29;
  overflow: hidden;
}
.dock-title {
  height: 37px;
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 8px;
}
.dock-title [role="tablist"] {
  height: 100%;
  display: flex;
}
.dock-title [role="tab"] {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 11px;
  color: var(--muted);
  padding: 7px 12px;
}
.dock-title [aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.debug-dock > section {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.debug-dock .panel-head {
  display: none;
}
.debug-dock .output-content {
  padding: 10px 14px;
}
.debug-dock .output-content > p:first-child {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 8px;
}
.debug-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.debug-buttons button {
  font-size: 10px;
  padding: 5px 8px;
}
.debug-dock p {
  font-size: 10px;
  margin: 7px 0;
  color: var(--muted);
}
#debug-state {
  color: var(--accent);
  overflow-wrap: anywhere;
}
.debug-dock details {
  padding: 5px 0;
  border-top: 1px solid #263849;
}
.debug-dock summary {
  font-size: 11px;
  cursor: pointer;
}
.debug-dock pre {
  font: 10px/1.7 Consolas;
  overflow: auto;
  max-height: 150px;
}
.debug-dock label {
  font-size: 10px;
  display: block;
  margin: 6px 0;
}
.debug-dock input {
  font-size: 11px;
}
.debug-dock .subtle {
  font-size: 9px;
}
.variable {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(80px, 1fr);
  gap: 2px 12px;
  padding: 4px 0;
  border-bottom: 1px solid #243744;
  font: 11px/1.4 Consolas;
}
.variable small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 9px;
}
.variable-label {
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  overflow-wrap: anywhere;
}
.variable-value {
  color: var(--accent);
  overflow-wrap: anywhere;
}
.variable-error {
  color: #e9b58c;
  font-size: 10px;
}
.variable-children {
  margin-left: 14px;
  border-left: 1px solid #344f62;
  padding-left: 10px;
}
#variables {
  max-height: 180px;
  overflow: auto;
  padding: 6px 0;
}
#watch-form {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
#watch-input {
  flex: 1;
  min-width: 130px;
}
.live-panel button {
  font-size: 10px;
  padding: 6px 8px;
}
.watch-table {
  overflow: auto;
}
.watch-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font: 10px/1.5 Consolas;
}
.watch-table td,
.watch-table th {
  padding: 5px;
  border-bottom: 1px solid #293e4f;
}
.watch-value {
  color: var(--accent);
}
.watch-detail {
  color: #8da5ba;
}
.watch-error .watch-value {
  color: #f59ba4;
}
.watch-table th {
  color: var(--muted);
  font-weight: normal;
}
.live-panel .panel-head {
  display: flex;
  border: 0;
  padding: 7px 14px 0;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
#watch-interval {
  font-size: 10px;
  padding: 3px 7px;
}
.debug-breakpoint {
  background: #fa6565;
  border-radius: 50%;
  transform: scale(0.55);
}
.debug-current-line {
  background: #e9bc3526;
}
.debug-current-arrow {
  border-left: 3px solid #e9bc35;
}
.editor-watch-menu {
  position: fixed;
  z-index: 10000;
  min-width: 245px;
  background: #202e3e;
  border: 1px solid #53657a;
  border-radius: 5px;
  padding: 5px;
  box-shadow: 0 6px 20px #0007;
}
.editor-watch-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
}
.editor-watch-menu button:hover {
  background: #344b5e;
}
dialog {
  background: #172332;
  color: var(--text);
  border: 1px solid #415569;
  border-radius: 10px;
  padding: 23px;
  max-width: 740px;
  width: 90vw;
  max-height: 88dvh;
  overflow: auto;
  box-shadow: 0 30px 100px #000a;
}
dialog::backdrop {
  background: #050a13b8;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 18px;
  font-weight: 550;
  margin: 0 0 12px;
}
dialog p {
  color: var(--muted);
  font-size: 12px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head button {
  border: 0;
  background: none;
  font-size: 20px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 20px 0;
}
.settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #a4b5c7;
  font-size: 11px;
}
.settings-grid textarea {
  min-height: 85px;
}
.settings-grid input,
.settings-grid select,
.settings-grid textarea {
  width: 100%;
}
#settings-error {
  color: #ff9e9e;
}
.details {
  margin: 20px 0;
}
.details summary {
  cursor: pointer;
}
#offline-status {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 8px;
}
.studio.explorer-hidden {
  grid-template-columns: 0 0 minmax(180px, 1fr) 4px var(--right);
}
.explorer-hidden > .explorer,
.explorer-hidden > #resize-left {
  visibility: hidden;
}
.studio.build-hidden {
  grid-template-columns: var(--left) 4px minmax(180px, 1fr) 0 0;
}
.build-hidden > #build-sidebar,
.build-hidden > #resize-right {
  visibility: hidden;
}
.studio.explorer-hidden.build-hidden {
  grid-template-columns: 0 0 minmax(180px, 1fr) 0 0;
}
.studio.console-hidden {
  grid-template-rows: minmax(0, 1fr) 0 0;
}
.console-hidden > .console-panel,
.console-hidden > #resize-console {
  visibility: hidden;
}
@media (max-width: 1150px) {
  :root {
    --left: 215px;
    --right: 260px;
  }
  .local {
    display: none;
  }
  .appbar {
    gap: 15px;
  }
  .app-actions {
    margin-left: auto;
  }
  .app-actions kbd {
    display: none;
  }
  .app-actions button {
    font-size: 11px;
    padding: 6px;
  }
  .editor-lang {
    display: none;
  }
}
@media (max-width: 800px) {
  .appbar {
    height: 46px;
    padding: 0 8px;
    gap: 8px;
  }
  .brand {
    gap: 5px;
  }
  .app-actions {
    gap: 1px;
  }
  .app-actions button {
    font-size: 10px;
    padding: 5px;
  }
  .app-actions #console-toggle {
    display: block;
    font-size: 0;
    padding: 5px;
  }
  .app-actions #console-toggle:before {
    content: "⌘";
    font-size: 13px;
  }
  .studio,
  .studio.explorer-hidden,
  .studio.build-hidden,
  .studio.explorer-hidden.build-hidden {
    grid-template-columns: 0 0 minmax(0, 1fr) 0 0;
  }
  .studio > .explorer,
  .studio > #build-sidebar {
    position: fixed;
    top: 46px;
    bottom: 25px;
    width: 265px;
    z-index: 30;
    box-shadow: 0 10px 45px #000b;
    visibility: hidden;
    border: 1px solid #3b4a5f;
  }
  .studio > .explorer {
    left: 0;
  }
  .studio > #build-sidebar {
    right: 0;
  }
  .studio.mobile-explorer > .explorer {
    visibility: visible;
  }
  .studio.mobile-build > #build-sidebar {
    visibility: visible;
  }
  #resize-left,
  #resize-right {
    display: none;
  }
  .statusbar {
    gap: 7px;
    font-size: 9px;
  }
  .status-left #status-project,
  .status-desktop {
    display: none;
  }
  .debug-dock {
    max-height: 60%;
  }
  .breadcrumbs {
    padding: 0 10px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .editor-top {
    height: 36px;
  }
  .file-tab > button {
    height: 32px;
  }
  .explorer .menu-items {
    top: 85px;
  }
  .files-title .menu-items {
    top: 260px;
  }
}
@media (max-height: 600px) {
  :root {
    --console: 115px;
    --debug: 185px;
  }
  .appbar {
    height: 42px;
  }
  .debug-dock {
    min-height: 100px;
  }
  .breadcrumbs {
    height: 23px;
  }
  .build-section {
    padding: 10px;
  }
  .target {
    margin-bottom: 8px;
    padding: 8px;
  }
  .build-sidebar-foot {
    display: none;
  }
}
@media (max-width: 420px) {
  .app-actions #explorer-toggle span {
    display: none;
  }
  .appbar {
    gap: 5px;
  }
  .app-actions {
    min-width: 0;
  }
}

/* Project and memory dialogs use the same field rhythm as the IDE settings. */
#new-project-dialog {
  max-width: 540px;
}
#new-project-dialog label,
#memory-dialog label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.memory-table {
  overflow: auto;
}
.memory-table table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}
.memory-table th {
  font-size: 11px;
  color: var(--muted);
  padding: 7px;
}
.memory-table td {
  padding: 4px;
}
.memory-table input {
  width: 100%;
  min-width: 95px;
}
.memory-table select {
  width: 100%;
}
#memory-preview {
  width: 100%;
  height: 245px;
  font:
    12px/1.5 Consolas,
    monospace;
  white-space: pre;
  resize: vertical;
}
#memory-error {
  color: #ff9e9e;
  min-height: 18px;
}

/* Live variable inspector */
.watch-table {
  overflow: auto;
}
.watch-table table {
  width: 100%;
  min-width: 570px;
  table-layout: auto;
}
.watch-table th {
  position: sticky;
  top: 0;
  background: #171d27;
  z-index: 1;
  text-align: left;
}
.watch-table td {
  height: 28px;
  vertical-align: middle;
  border-bottom: 1px solid #ffffff09;
}
.watch-name {
  white-space: nowrap;
}
.watch-disclosure {
  width: 22px;
  min-width: 22px;
  padding: 2px !important;
  border: 0 !important;
  background: transparent !important;
}
.watch-disclosure:disabled {
  opacity: 0.25;
}
.watch-type,
.watch-address {
  color: var(--muted);
  font:
    11px ui-monospace,
    monospace;
  white-space: nowrap;
}
.watch-value {
  min-width: 110px;
  font:
    12px ui-monospace,
    monospace;
}
.watch-value-text {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  padding: 3px 6px;
  text-align: left;
}
button.watch-value-text:hover {
  border-color: #5577aa;
  background: #23334b;
}
.watch-changed .watch-value-text {
  color: #f3c878;
}
.watch-error .watch-value-text,
.watch-edit-error {
  color: #ff8d8d;
}
.watch-editing input,
.watch-editing select {
  max-width: 180px;
  font: inherit;
}
.watch-edit-error {
  display: block;
  max-width: 300px;
  white-space: normal;
}
.watch-empty {
  padding: 22px !important;
  color: var(--muted);
}

#debug-view .live-panel {
  border: 0;
  overflow: visible;
}
#local-rows th,
.watch-group th {
  text-align: left;
  padding: 6px 8px;
}

.collections-dialog {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.collection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.collection-heading h2 {
  margin: 4px 0 12px;
}
.collection-heading small {
  color: #71b7ff;
  letter-spacing: 0.1em;
}
.collection-connect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.collection-connect label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.collection-connect input {
  width: 100%;
  min-width: 0;
}
.collection-note,
.collection-origin,
.collections-dialog footer {
  font-size: 12px;
  color: #a4b1c4;
  overflow-wrap: anywhere;
}
#collection-status {
  padding: 10px 0;
  min-height: 38px;
  color: #8ed1c5;
}
#collection-list section {
  border-top: 1px solid #303c50;
  padding: 10px 0;
}
.collection-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px;
  margin: 8px 0;
  border: 1px solid #303c50;
  border-radius: 8px;
  background: #171f2c;
}
.collection-entry p {
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.collection-entry small {
  color: #8ed1c5;
}
.collection-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .collection-connect {
    grid-template-columns: 1fr;
  }
  .collection-entry {
    align-items: stretch;
    flex-direction: column;
  }
}

#serial-monitor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#serial-monitor[hidden],
#log[hidden] {
  display: none;
}
.serial-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
}
.serial-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}
.serial-toolbar input[type="number"] {
  width: 94px;
}
.serial-toolbar input[type="checkbox"] {
  width: auto;
}
.serial-toolbar button,
.serial-toolbar select,
.serial-toolbar input,
#serial-send-form button,
#serial-send-form select,
#serial-send-form input {
  font-size: 11px;
  padding: 5px 7px;
}
.serial-settings > summary {
  cursor: pointer;
  font-size: 11px;
}
.serial-settings > div {
  position: fixed;
  z-index: 50;
  bottom: 75px;
  right: 12px;
  max-width: calc(100vw - 24px);
  background: #172332;
  padding: 14px;
  border: 1px solid #415569;
  border-radius: 6px;
  display: grid;
  gap: 8px;
}
.serial-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding: 4px 12px;
  font-size: 10px;
  color: var(--muted);
}
#serial-status {
  color: #8ed1c5;
}
#serial-log {
  flex: 1;
  min-height: 28px;
  overflow: auto;
  margin: 0;
  padding: 6px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #c1d5e4;
  font:
    12px/1.5 Consolas,
    monospace;
}
#serial-send-form {
  display: flex;
  flex: none;
  gap: 6px;
  padding: 6px 12px;
  border-top: 1px solid var(--line);
}
#serial-input {
  flex: 1;
  min-width: 40px;
}
.console-header [aria-selected="true"] {
  color: #8ed1c5;
  border-bottom: 2px solid #8ed1c5;
  border-radius: 0;
}
#serial-indicator.connected {
  color: #64dfbd;
}
@media (max-width: 800px) {
  #serial-toggle span {
    display: none;
  }
}
@media (max-width: 500px) {
  #serial-send-form {
    flex-wrap: wrap;
  }
  #serial-input {
    flex-basis: 60%;
  }
  .serial-toolbar {
    gap: 5px;
    padding: 5px;
  }
}

:root {
  --bg: #202630;
  --panel: #2b3441;
  --raised: #364252;
  --line: #4b596c;
  --text: #f0f4fa;
  --muted: #bbc6d5;
  --accent: #80bfff;
  --left: 264px;
  --right: 302px;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.appbar {
  height: 48px;
  min-height: 48px;
  background: #354254;
  border-bottom: 1px solid #4b596c;
  padding: 0 16px;
  gap: 20px;
}
.brand {
  min-width: 198px;
  gap: 9px;
}
.brand-mark {
  border-radius: 7px;
  background: #305b87;
  border: 1px solid #6297cd;
  color: #dfedff;
  box-shadow: none;
}
.appbar > .local {
  display: none;
}

.app-actions {
  flex: 1;
  gap: 8px;
  justify-content: flex-end;
}
.toolbar-target {
  font:
    11px Consolas,
    monospace;
  color: #b3b7c6;
  margin: 0 6px;
}
button,
input,
select,
textarea {
  border-color: #596b81;
  background: #3b495c;
  border-radius: 5px;
}
button {
  font-size: 13px;
  padding: 6px 10px;
}
input,
select,
textarea {
  background: #222b38;
  color: #f0f4fa;
}
button:hover:not(:disabled) {
  background: #485b73;
  border-color: #8198b5;
}
button.primary,
.toolbar-build {
  background: #2365ac;
  color: #fff;
  border-color: #559eea;
}
button.primary:hover:not(:disabled) {
  background: #2d76c3;
}
button[aria-pressed="true"] {
  background: #344e70;
  color: #deeeff;
  border-color: #6a97c7;
}
.activity-rail {
  display: flex;
  flex: 0 0 38px;
  min-height: 38px;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
  background: #2d3949;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
.activity-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px 4px 0 0;
  height: 34px;
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
  background: transparent;
  color: #c2cede;
}
.activity-button:last-child {
  margin-left: auto;
}
.activity-button[aria-pressed="true"] {
  color: #e1f0ff;
  background: #3c5778;
}
.activity-button[aria-pressed="true"]:before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: #83c5ff;
  border-radius: 2px;
}
.studio {
  margin-left: 0;
}
.activity-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.explorer {
  background: #2b3441;
  border-right: 0;
}
.section-title {
  color: #c5d0df;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}
.workspace-open {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #e0e3ec;
  border: 0;
  background: none;
  font-weight: 600;
  text-align: left;
  font-size: 13px;
  padding-left: 0;
}
.workspace-open span {
  color: var(--muted);
}
.root-bar {
  background: #2b3441;
  border-bottom: 1px solid var(--line);
}
.root-button {
  background: #354253;
  color: #c7cbda;
  border: 1px solid #383c4b;
}
.project-picker {
  background: #2b3441;
}
.project-picker select {
  background: #3d4d62;
  border-color: #3d4355;
  font-weight: 600;
}
.file-search input {
  background: #242d39;
  border-color: #333640;
}
#file-tree {
  flex: 1;
  min-height: 65px;
}
#file-tree button {
  color: #b7bdce;
  font-size: 13px;
  border-radius: 0;
}
#file-tree button.selected {
  background: #2b3144;
  color: #e4e9ff;
  border-left-color: #9dafff;
}
#file-tree .tree-root {
  color: #d1d6e6;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.include-section {
  border-top: 1px solid var(--line);
  max-height: 32%;
  overflow: auto;
  flex: none;
}
.include-section > summary {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  cursor: pointer;
  padding: 10px 12px;
  color: #989fb3;
  font-size: 11px;
  font-weight: 600;
}
#include-count {
  float: right;
  background: #303440;
  color: #bec5d7;
  border-radius: 4px;
  padding: 0 6px;
}
#include-tree button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 5px 16px;
  border-radius: 0;
  font-size: 11px;
  text-align: left;
}
#include-tree button span {
  overflow-wrap: anywhere;
}
#include-tree small {
  color: var(--muted);
  font-size: 11px;
}
.editor-pane,
.editor-stack {
  background: #242d39;
}
.editor-toolbar,
.file-tabs {
  background: #2e3948;
  border-color: var(--line);
}
.file-tab.active {
  background: #35465b;
  border-top-color: #9caeff;
}
.file-tab.active button {
  color: #d5ddff;
}
.file-tab {
  border-right: 1px solid #2a2d37;
}
.console-panel {
  background: #25303d;
}
.console-header {
  background: #334255;
  border-color: var(--line);
}
.console-header [aria-selected="true"] {
  color: #b5c4ff;
  border-bottom-color: #97aaff;
}
#build-sidebar {
  background: #2e3948;
}
.target {
  background: #3c4d64;
  border-color: #3b455e;
  border-radius: 7px;
}
.target strong {
  color: #d2dcff;
}
#build {
  background: #2365ac;
  border-color: #8396e1;
  color: #fff;
}
.appbar #build,
.appbar #flash {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
}
.statusbar {
  background: #242939;
  border-color: #343c53;
  color: #acb8d4;
  font-size: 11px;
}
.status-left {
  color: #b6c5e5;
}
.splitter {
  background: #40516a;
}
.splitter:hover {
  background: #8296dd;
}
dialog {
  background: #2e3948;
  border: 1px solid #454957;
  border-radius: 10px;
  box-shadow: 0 24px 90px #0009;
  color: var(--text);
}
dialog::backdrop {
  background: #08090db3;
  backdrop-filter: blur(3px);
}
#settings-dialog {
  width: min(1040px, 94vw);
  max-width: 1040px;
  padding: 0;
  overflow: hidden;
}
#settings-form {
  display: flex;
  flex-direction: column;
  max-height: 88dvh;
}
.settings-heading,
.workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}
.settings-heading small,
.workspace-heading small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.8px;
}
.settings-heading h2,
.workspace-heading h2 {
  font-size: 23px;
  margin: 5px 0;
  letter-spacing: -0.5px;
}
.settings-heading p,
.workspace-heading p {
  margin: 0;
  color: #9da5bb;
}
.settings-heading button {
  background: none;
  border: 0;
  font-size: 23px;
}
.settings-workspace {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 365px;
  overflow: auto;
}
.settings-workspace > nav {
  background: #2b3441;
  border-right: 1px solid var(--line);
  padding: 18px 12px;
}
.settings-workspace > nav button {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 14px;
  background: none;
  border: 0;
  margin: 4px 0;
  padding: 12px;
  color: #a4aabd;
}
.settings-workspace > nav button > span {
  color: var(--muted);
  font: 10px Consolas;
}
.settings-workspace > nav button[aria-current="page"] {
  color: #d3ddff;
  background: #2d344b;
}
.settings-content {
  padding: 25px 30px;
}
.settings-content h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}
.settings-content section > p {
  color: #939caf;
  margin: 0 0 24px;
  max-width: 580px;
  line-height: 1.7;
}
.settings-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #aeb5c6;
}
.settings-fields input,
.settings-fields select {
  width: 100%;
  padding: 9px 11px;
}
.settings-fields textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px;
  resize: vertical;
  font:
    12px/1.6 Consolas,
    monospace;
}
.settings-fields .full-width {
  grid-column: 1/-1;
}
.settings-content section > button {
  margin-top: 18px;
}
.settings-command {
  padding: 10px 28px;
  background: #2b3441;
  border-top: 1px solid var(--line);
}
.settings-command summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}
.settings-command pre {
  white-space: pre-wrap;
  color: #a1b0d4;
  font:
    11px/1.7 Consolas,
    monospace;
}
#settings-error {
  margin: 0;
  padding: 0 28px;
  color: #ffb0ab;
}
.settings-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.settings-footer > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}
.project-overview {
  width: min(1100px, 94vw);
  max-width: 1100px;
  padding: 0;
}
.workspace-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 28px;
}
.workspace-toolbar input {
  flex: 1;
  min-width: 150px;
}
.workspace-projects {
  padding: 0 28px 24px;
  max-height: 53vh;
  overflow: auto;
}
.workspace-project {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #373c49;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 10px;
  background: #364558;
}
.workspace-project.current {
  border-color: #6577b8;
  background: #3b536f;
}
.project-monogram {
  display: grid;
  place-items: center;
  width: 40px;
  height: 42px;
  border-radius: 8px;
  background: #343d57;
  color: #b8c8ff;
  font-weight: 650;
  flex-shrink: 0;
}
.workspace-project > div:not(.workspace-project-actions) {
  flex: 1;
  min-width: 100px;
}
.workspace-project strong {
  font-size: 14px;
}
.workspace-project p {
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.workspace-project small {
  color: var(--muted);
  font-size: 11px;
}
.workspace-project-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 280px;
  justify-content: flex-end;
}
.workspace-project-actions button {
  font-size: 11px;
}
.project-overview > footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 16px 28px;
  font-size: 11px;
}
.input-dialog {
  width: min(500px, 92vw);
  padding: 24px;
}
.input-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.input-dialog header button {
  background: none;
  border: 0;
  font-size: 20px;
}
.input-dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}
.input-dialog input {
  padding: 10px;
}
.input-dialog footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.dialog-error {
  color: #ffb0ab;
}
@media (max-width: 1100px) {
  .brand {
    min-width: 150px;
  }
  .toolbar-target {
    display: none;
  }
  .appbar {
    gap: 12px;
  }
}
@media (max-width: 800px) {
  .appbar {
    height: 48px;
    padding: 0 8px;
  }
  .brand {
    min-width: 0;
  }

  .activity-rail {
    padding: 0 4px;
  }
  .activity-button {
    padding: 0 8px;
  }
  .studio {
    margin-left: 0;
  }
  .studio > .explorer {
    left: 0;
  }
  .studio > .explorer,
  .studio > #build-sidebar {
    top: 87px;
  }
  .settings-workspace {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .settings-content {
    padding: 20px;
  }
  .settings-fields {
    grid-template-columns: 1fr;
  }
  .settings-footer {
    flex-wrap: wrap;
  }
  .settings-footer > span {
    width: 100%;
  }
  .workspace-project {
    flex-wrap: wrap;
  }
  .workspace-project-actions {
    max-width: none;
    justify-content: flex-start;
    width: 100%;
  }
}
@media (max-width: 500px) {
  .settings-heading,
  .workspace-heading {
    padding: 18px;
  }
  .settings-workspace {
    display: block;
  }
  .settings-workspace > nav {
    display: flex;
    overflow: auto;
    padding: 5px;
    border-right: 0;
  }
  .settings-workspace > nav button {
    padding: 9px;
    width: auto;
    flex-shrink: 0;
    gap: 5px;
  }
  .settings-workspace > nav button > span {
    display: none;
  }
  .workspace-toolbar,
  .workspace-projects {
    padding: 12px;
  }
  .workspace-project {
    padding: 14px;
  }
  .app-actions {
    gap: 4px;
  }
  .app-actions #save {
    display: none;
  }
}
/* A single explorer contains every project; the active build target is marked. */
.project-picker[hidden] {
  display: none;
}
#file-tree .project-tree-root {
  margin: 4px 0;
}
#file-tree .project-tree-root > summary {
  min-height: 32px;
  padding: 7px 8px;
  font-weight: 600;
  color: #dce0ec;
}
#file-tree .active-project > summary {
  background: #364e70;
  color: #c7ccff;
  border-left: 2px solid #a5adff;
}
#file-tree .project-tree-state {
  float: right;
  color: #a5adff;
  font-size: 11px;
  font-weight: 400;
  margin-left: 5px;
}
#file-tree details details {
  margin-left: 14px;
}
#file-tree .project-tree-root > button {
  padding-left: 25px;
}
#file-tree details details > button {
  padding-left: 26px;
}
#file-tree .project-tree-heading {
  overflow-wrap: anywhere;
}
.project-context-menu {
  position: fixed;
  z-index: 10000;
  min-width: 220px;
  max-width: calc(100vw - 8px);
  padding: 5px;
  background: #334255;
  border: 1px solid #414652;
  border-radius: 7px;
  box-shadow: 0 12px 36px #0008;
}
.project-context-menu button {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 12px;
}
.project-context-menu button:hover,
.project-context-menu button:focus {
  background: #486080;
  outline: none;
}
.collection-default {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #3a4f6b;
  border-radius: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.controller-details,
.controller-status {
  color: #a4adbf;
  font-size: 13px;
}
.controller-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.controller-dialog {
  width: min(700px, 94vw);
  max-height: 90vh;
  overflow: auto;
}
.controller-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.controller-dialog textarea {
  width: 100%;
  font:
    12px/1.5 Consolas,
    monospace;
}
.controller-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.controller-dialog .profile-error {
  color: #ffacac;
}

/* Shared dark graphite palette: readable secondary text and clear surfaces. */
.activity-button {
  font-size: 12px;
}
button:disabled {
  opacity: 1;
  color: #9baabc;
  background: #303a48;
  border-color: #47566a;
}
input::placeholder,
textarea::placeholder {
  color: #abb9cb;
  opacity: 1;
}
.debug-dock,
.console-panel {
  background: #27323f;
}
.dock-title,
.console-tabs {
  background: #344357;
}
#debug-view .live-panel .panel-head {
  display: flex;
  padding: 8px 0;
}
#debug-view .live-panel .output-content {
  padding: 0;
}
#debug-view .debug-buttons button,
#debug-view p {
  font-size: 12px;
}
.watch-table thead th {
  background: #3a4b61;
  color: #f0f4fa;
}
.watch-table td {
  border-bottom-color: #46576d;
}
.watch-table tbody tr:hover {
  background: #35485e;
}
#local-rows th,
.watch-group th {
  background: #303f52;
  color: #cbdcf0;
}
.watch-value-text {
  color: #f0f4fa;
}
.watch-type,
.watch-address {
  color: #b9cce2;
}
.watch-changed .watch-value-text {
  color: #ffe294;
}
.primary kbd {
  color: #e3efff;
}

/* Layout transferred from the supplied MCU_Studio reference, 20 Oct 2026. */
.project-heading-title {
  margin-right: auto;
}
.menu-items button,
.menu-items #root-path {
  white-space: normal;
  overflow-wrap: anywhere;
}
.build-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.build-status[hidden] {
  display: none;
}
.build-status p {
  margin: 0;
}
.build-status #status {
  flex: 1 1 220px;
}
.build-status #downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.build-status #flash-progress {
  width: 160px;
}
.build-status #binary-size::after {
  content: " Bytes";
  font-weight: 400;
}
.build-status #dfu-help {
  flex-basis: 100%;
  color: var(--muted);
  line-height: 1.5;
}
#upload-transport {
  width: 150px;
}
.register-libraries {
  width: min(860px, 94vw);
  max-height: 88vh;
  overflow: auto;
}
.library-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.library-tools input:first-child {
  flex: 1;
  min-width: 220px;
}
.library-tools input:nth-child(2) {
  width: 140px;
}
.register-libraries article {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin-top: 12px;
}
.register-libraries article h3 {
  margin: 0 0 8px;
}
.register-libraries article small {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}
.register-libraries article select {
  margin-right: 8px;
}
.register-libraries details {
  margin-top: 12px;
}
.register-libraries pre {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
}
.toolbar-connect {
  max-width: 195px;
}
@media (max-width: 1150px) {
  .appbar {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .app-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .toolbar-target {
    display: none;
  }
}

.settings-fields .compiler-checkbox { display:flex; flex-direction:row; align-items:center; gap:10px; align-self:start; padding-top:26px; }
.settings-fields .compiler-checkbox input { width:18px; height:18px; min-height:18px; margin:0; flex:0 0 18px; }

#file-tree button[data-kind]::before {content:attr(data-kind); display:inline-block; min-width:3ch; margin-right:.5em; color:#80caff;font:600 10px/1.4 monospace;text-align:center}
#file-tree button:is([data-kind="H"],[data-kind="H++"])::before {color:#85dab6}
#file-tree button:is([data-kind="ASM"],[data-kind="LD"])::before {color:#ffc68b}
#file-tree button[data-kind="CFG"]::before {color:#d9afff}

.editor-watch-menu{max-height:calc(100vh - 8px);overflow:auto}.editor-watch-menu button:focus-visible{outline:1px solid #80caff}.editor-watch-menu button:is([data-action="format-document"],[data-action="undo"],[data-action="actions.find"],[data-action="live-watch"]){border-top:1px solid #53657a;margin-top:3px;padding-top:4px}.editor-watch-menu button:disabled{opacity:.5}

/* Visual layer. Layout, resizing and feature visibility live in workbench.css. */
:root {
  --bg: #101419;
  --panel: #191f28;
  --raised: #252e3b;
  --line: #394658;
  --text: #eff4fc;
  --muted: #b2bfd0;
  --accent: #91bcff;
  --violet: #c5b1ff;
  --left: 272px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
}
body {
  background: var(--bg);
}
* {
  scrollbar-color: #586b84 #151b23;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: #7ce6c6;
}
button,
input,
select,
textarea {
  border-radius: 7px;
  border-color: #526176;
  background: #252e3b;
  color: var(--text);
}
button {
  min-height: 30px;
  font-weight: 500;
}
button:hover:not(:disabled) {
  background: #344256;
  border-color: #91bcff;
  color: #fff;
}
button:disabled {
  background: #1c232d;
  border-color: #354052;
  color: #8996a8;
}
input,
select,
textarea {
  background: #111821;
}
input::placeholder,
textarea::placeholder {
  color: #a8b5c7;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #a5c9ff;
  outline-offset: 2px;
}
button.primary,
#run {
  color: #0a2924;
  background: #7ce6c6;
  border-color: #7ce6c6;
  font-weight: 650;
}
button.primary:hover:not(:disabled),
#run:hover:not(:disabled) {
  color: #07221c;
  background: #a2f5dc;
  border-color: #a2f5dc;
}
button.primary:disabled,
#run:disabled {
  color: #8996a8;
  background: #1c232d;
  border-color: #354052;
}
button[aria-pressed="true"] {
  background: #253954;
  color: #d3e4ff;
  border-color: #789aca;
}
.appbar {
  min-height: 62px;
  height: 62px;
  background: #101419;
  padding: 0 18px;
  gap: 24px;
  border-bottom: 0;
}
.brand {
  min-width: 185px;
  gap: 10px;
}
.brand-mark {
  width: 213px;
  height: 40px;
  flex: 0 0 213px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-actions {
  justify-content: flex-end;
  gap: 16px;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.toolbar-group + .toolbar-group {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.appbar #build {
  background: #253954;
  border-color: #739bd1;
  color: #e4efff;
}
.appbar #build:hover:not(:disabled) {
  background: #334f73;
  border-color: #a5c9ff;
}
.appbar #build:disabled {
  background: #1c232d;
  border-color: #354052;
  color: #8996a8;
}
.toolbar-connect {
  background: #252e3b;
}
.activity-rail {
  background: #101419;
  min-height: 46px;
  flex-basis: 46px;
  padding: 0 18px 8px;
  gap: 6px;
  border-color: #303b4a;
}
.activity-button {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b2bfd0;
  font-size: 13px;
  padding: 0 12px;
  gap: 8px;
}
.activity-button[aria-pressed="true"] {
  color: #eff6ff;
  background: #29374b;
  border-color: #526d90;
}
.activity-button[aria-pressed="true"]:before {
  display: none;
}
.activity-button:last-child {
  margin-left: 0;
}
.toolbar-target {
  margin-left: auto;
  color: #bdcde1;
  padding: 4px 9px;
  border: 1px solid #394658;
  border-radius: 5px;
  font-size: 11px;
}
.explorer,
.root-bar,
.project-picker {
  background: #191f28;
}
.explorer {
  padding-top: 7px;
}
.section-title {
  color: #c3cede;
  letter-spacing: 0.8px;
  font-size: 11px;
}
.project-picker {
  padding-top: 10px;
  padding-bottom: 16px;
}
.project-picker label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}
.project-picker select {
  background: #283548;
  border-color: #5f7592;
  min-height: 36px;
  color: #f4f7fc;
}
#project-new {
  flex: 0 0 36px;
  height: 36px;
  font-size: 22px;
  color: var(--accent);
}
#debug-dock > .dock-title {
  height: auto;
  min-height: 42px;
  gap: 10px;
  padding: 5px 8px;
}
#debug-dock > .dock-title > span {
  white-space: nowrap;
}
#debug-dock .dock-title .debug-buttons {
  display: flex;
  flex: 1;
  gap: 5px;
  overflow-x: auto;
  min-width: 0;
}
#debug-dock .dock-title .debug-buttons button {
  flex: none;
  font-size: 11px;
  padding: 5px 8px;
}
.file-search input {
  background: #111821;
  border-color: #46566b;
  min-height: 32px;
}
#file-tree button {
  color: #d4deeb;
  font-size: 13px;
  min-height: 30px;
}
#file-tree button:hover {
  background: #263245;
}
#file-tree button.selected {
  background: #243b56;
  color: #f2f7ff;
  border-left-color: #8cc7ff;
}
#file-tree .tree-root {
  color: #dce7f5;
  background: transparent;
}
#file-tree .active-project > summary {
  background: #263447;
  color: #e4edf9;
  border-left-color: #7ce6c6;
}
.include-section > summary {
  color: #c2cedd;
  font-size: 12px;
}
#include-count {
  background: #303e50;
  color: #e2ebf6;
}
.editor-column {
  margin: 8px 8px 8px 0;
  border: 1px solid #394658;
  border-radius: 10px;
  overflow: hidden;
  background: #161b23;
}
.editor-wrap,
.editor-pane,
.editor-stack {
  background: #161b23;
}
.editor-top,
.editor-toolbar,
.file-tabs,
#file-tabs {
  background: #1c232e;
  border-color: #394658;
}
.file-tab {
  border-color: #394658;
  min-height: 37px;
}
.file-tab.active {
  background: #161b23;
  border-top-color: #7ce6c6;
}
.file-tab.active button {
  color: #eff8ff;
}
.file-tab button {
  font-size: 12px;
}
.breadcrumbs {
  background: #161b23;
  color: #bdc9da;
  border-color: #303b4a;
  min-height: 29px;
}
.editor-lang {
  color: #aabacf;
}
.splitter {
  background: #101419;
}
.splitter:hover,
.splitter:active {
  background: #91bcff;
}
.statusbar {
  background: #101419;
  color: #b5c3d5;
  border-color: #303b4a;
  min-height: 27px;
}
.status-left {
  color: #cae3da;
}
.debug-dock,
.console-panel,
#build-sidebar,
.live-panel {
  background: #191f28;
}
.dock-title,
.console-header,
.console-tabs,
.panel-head {
  background: #222c39;
  border-color: #45566d;
  color: #e0e9f6;
}
.console-header [aria-selected="true"] {
  color: #9debd5;
  border-bottom-color: #7ce6c6;
}
.build-status {
  background: #191f28;
  color: #c4d2e4;
}
#log {
  color: #e1e9f4;
  font-size: 12px;
  line-height: 1.7;
}
.watch-table thead th {
  background: #293649;
  color: #f0f5fc;
}
.watch-table td {
  border-bottom-color: #38475a;
}
.watch-table tbody tr:hover {
  background: #26354a;
}
#local-rows th,
.watch-group th {
  background: #232e3d;
  color: #d6e4f7;
}
.watch-value-text {
  color: #f1f6ff;
}
.watch-type,
.watch-address {
  color: #b8cce6;
}
.watch-changed .watch-value-text {
  color: #ffe39a;
}
dialog {
  background: #202936;
  border-color: #62758f;
  border-radius: 14px;
  box-shadow: 0 28px 100px #000b;
}
dialog::backdrop {
  background: #060a10b8;
  backdrop-filter: blur(4px);
}
dialog h2 {
  color: #f4f7fc;
  letter-spacing: -0.4px;
}
dialog p,
.subtle,
.controller-details,
.controller-status {
  color: #b7c6d9;
}
dialog label {
  color: #dce5f2;
}
.menu-items,
.project-context-menu {
  background: #252f3e;
  border: 1px solid #687b94;
  border-radius: 9px;
  box-shadow: 0 14px 36px #0009;
}
.menu-items button,
.project-context-menu button {
  color: #eef4fc;
  min-height: 34px;
  border-radius: 5px;
}
.menu-items button:hover,
.project-context-menu button:hover {
  background: #3a4e69;
}
.settings-workspace > nav,
.settings-command {
  background: #19212c;
}
.settings-workspace > nav button {
  color: #becbdd;
  border-radius: 7px;
}
.settings-workspace > nav button[aria-current="page"] {
  background: #304762;
  color: #f1f7ff;
}
.settings-content section > p,
.settings-heading p,
.workspace-heading p,
.settings-fields label,
.settings-command pre {
  color: #bdcbdd;
}
.settings-fields input,
.settings-fields select {
  min-height: 38px;
}
.register-libraries article,
.collection-default,
.target {
  background: #19222f;
  border-color: #52657f;
  border-radius: 9px;
}
.collection-default {
  border: 1px solid #52657f;
}
.register-libraries article h3 {
  color: #b0d0ff;
}
.primary kbd {
  color: inherit;
}
@media (max-width: 1200px) {
  .appbar {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 12px;
  }
  .app-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .toolbar-group {
    flex-wrap: wrap;
  }
  .toolbar-target {
    display: none;
  }
}
@media (max-width: 650px) {
  .toolbar-group + .toolbar-group {
    border: 0;
    padding-left: 0;
  }
  .activity-rail {
    padding-left: 8px;
    padding-right: 8px;
  }
  .activity-button {
    padding: 0 8px;
  }
  .editor-column {
    margin-right: 3px;
  }
}
