:root {
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  color: #203746;
  background: #d8dde0;
  font-synthesis: none;
  --ink: #203746;
  --ink-2: #50616b;
  --muted: #7e8a91;
  --blue: #2d6897;
  --blue-2: #3c7dad;
  --blue-dark: #1f5279;
  --line: #b9c2c7;
  --line-soft: #dfe4e6;
  --chrome: #eef1f1;
  --surface: #fbfcfb;
  --green: #23784a;
  --red: #a44942;
  --amber: #a86f18;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #d8dde0;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #dfe3e5;
  color: var(--ink);
}

button, input {
  font: inherit;
}

button {
  color: inherit;
}

button:disabled {
  cursor: not-allowed !important;
  opacity: .5;
}

button:focus-visible, input:focus-visible {
  outline: 1px dotted #184f79;
  outline-offset: 2px;
}

code {
  font-family: "Courier New", ui-monospace, monospace;
}

.positive, .is-positive {
  color: var(--green) !important;
}

.negative, .is-negative {
  color: var(--red) !important;
}

.is-flat {
  color: var(--muted) !important;
}

.control-glyph {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}

.deskbar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #17496e;
  background: linear-gradient(#447faa,#2d6794);
  box-shadow: inset 0 1px rgba(255,255,255,.35);
}

.deskbar-brand {
  color: white;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-shadow: 0 1px #214e70;
}


.route-root {
  min-height: 100vh;
}

.route-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.route-loading i {
  width: 16px;
  height: 16px;
  border: 2px solid #bfcbd2;
  border-top-color: #2d6e9e;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.desktop-content {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 42px 0 14px;
}

.agent-shell {
  overflow: hidden;
  border: 1px solid #8e9ca4;
  background: #f5f6f5;
  box-shadow: 0 5px 18px rgba(34,50,61,.13), inset 0 1px #fff;
}

button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.agent-primary-tabs {
  min-height: 31px;
  display: flex;
  align-items: end;
  gap: 2px;
  padding: 5px 8px 0;
  border-top: 1px solid #d7dddf;
  border-bottom: 1px solid #9faab0;
  background: #e7ebec;
}

.agent-primary-tabs button {
  min-width: 92px;
  height: 26px;
  padding: 0 14px;
  border: 1px solid #a9b4b9;
  border-bottom: 0;
  background: #dfe4e6;
  color: #60727c;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.agent-primary-tabs button.is-active {
  position: relative;
  top: 1px;
  background: #f4f5f4;
  color: #173f5a;
}

.agent-primary-tabs button:disabled {
  cursor: default !important;
  opacity: .48;
}

.agent-tab-workspace {
  display: block;
}

@media (max-width: 640px) {
  .agent-primary-tabs button {
    min-width: 0;
    padding: 0 8px;
  }
}

.operations-band {
  background: #f4f5f4;
  border-bottom: 1px solid #aeb9bf;
}

.agent-overview {
  position: relative;
  background: #fbfcfb;
}

.agent-overview-main {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(240px,1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
}

.agent-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-led {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a9b1b5;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}

.library-led.on {
  background: #35a861;
}

.library-led.warn {
  background: #cb8a25;
}

.library-led.bad {
  background: #b9534c;
}

.library-led.idle {
  background: #aeb7bb;
}

.agent-name-block {
  min-width: 0;
}

.agent-code {
  display: inline-block;
  margin-right: 7px;
  color: #75848c;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}

.agent-name-button {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #173f5a;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  vertical-align: middle;
}

.agent-name-button .control-glyph {
  width: 11px;
  height: 11px;
  color: #849199;
  opacity: 0;
}

.agent-name-button:hover .control-glyph, .agent-name-button:focus-visible .control-glyph {
  opacity: 1;
}

.agent-name-block code {
  display: block;
  margin-top: 3px;
  color: #8a9499;
  font-size: 9px;
}

.agent-name-input {
  width: min(260px,100%);
  height: 25px;
  padding: 2px 5px;
  border: 1px solid #718c9d;
  background: #fff;
  color: #173e59;
  font-size: 13px;
  font-weight: 700;
}

.agent-header-stats {
  display: flex;
  align-items: stretch;
  border: 1px solid #d6dddf;
  background: #f7f8f7;
}

.agent-header-stats > span {
  min-width: 88px;
  padding: 6px 10px;
  border-left: 1px solid #d9dfe2;
}

.agent-header-stats > span:first-child {
  border-left: 0;
}

.agent-header-stats small, .agent-header-stats strong {
  display: block;
}

.agent-header-stats small {
  color: #7c898f;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 700;
}

.agent-header-stats strong {
  margin-top: 3px;
  color: #254a63;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1;
}

.agent-header-stats em {
  margin-left: 2px;
  color: #89959b;
  font-size: 8px;
  font-style: normal;
  font-weight: 400;
}

.agent-header-actions {
  display: flex;
  gap: 4px;
}

.toolbar-icon-button, .mini-icon-button, .window-control-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #9faab0;
  background: linear-gradient(#fff,#edf0f0);
  color: #486878;
  cursor: pointer;
  box-shadow: inset 0 1px #fff;
}

.toolbar-icon-button {
  width: 27px;
  height: 27px;
}

.toolbar-icon-button:hover, .mini-icon-button:hover, .window-control-button:hover {
  border-color: #6f8795;
  background: #fff;
  color: #1f5e88;
}

.agent-util-track {
  height: 2px;
  overflow: hidden;
  background: #e2e7e8;
}

.agent-util-track i {
  height: 100%;
  display: block;
  background: #4e86ae;
}

.deploy-panel {
  border-top: 1px solid #fff;
  background: #eef1f1;
}

.agent-deploy-grid {
  display: grid;
  grid-template-columns: minmax(250px,1.18fr) minmax(245px,1fr) minmax(210px,.78fr) 96px;
  gap: 7px;
  align-items: end;
  padding: 7px 9px 8px;
}

.deploy-field-shell {
  min-width: 0;
}

.deploy-field-code {
  display: block;
  margin-bottom: 3px;
  color: #687981;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 700;
}

.control-combobox, .strategy-select-control, .capital-control {
  width: 100%;
  height: 34px;
  border: 1px solid #9faab0;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(29,48,62,.04);
}

.control-combobox {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 8px 27px;
  align-items: center;
  cursor: text;
}

.control-combobox:hover, .strategy-select-control:hover, .capital-control:hover {
  border-color: #748a97;
}

.control-combobox.is-open {
  border-color: #477798;
  box-shadow: 0 0 0 1px #d7e4eb;
}

.control-leading {
  display: grid;
  place-items: center;
  color: #416f8e;
}

.token-mini-mark {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid #c7d1d5;
  background: #eef3f5;
  color: #2e6387;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 800;
}

.control-input-area {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 6px;
}

.control-input-area input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #183d58;
  font-size: 10px;
  font-weight: 700;
}

.control-selection-hint {
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 8px;
  white-space: nowrap;
}

.control-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c8ced1;
}

.control-status-dot.is-verified {
  background: #3b9b62;
}

.control-trigger {
  width: 27px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid #e1e5e6;
  background: transparent;
  color: #637985;
  cursor: pointer;
}

.control-trigger:hover {
  background: #eef3f5;
}

.strategy-select-control {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 25px;
  align-items: center;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.strategy-select-icon {
  display: grid;
  place-items: center;
  color: #416d89;
}

.strategy-select-copy {
  min-width: 0;
}

.strategy-select-copy strong, .strategy-select-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-select-copy strong {
  color: #244a63;
  font-size: 10px;
}

.strategy-select-copy small {
  margin-top: 1px;
  color: #828c91;
  font-size: 8px;
}

.strategy-select-chevron {
  display: grid;
  place-items: center;
  color: #75848c;
}

.capital-control {
  display: grid;
  grid-template-columns: minmax(90px,1fr) auto;
  overflow: hidden;
}


.capital-control.is-warn {
  border-color: #b78b3f;
  box-shadow: inset 0 0 0 1px rgba(183,139,63,.12);
}

.deploy-budget-meta.is-warn, .deploy-budget-meta.is-warn strong {
  color: var(--amber);
}
.capital-control.is-error {
  border-color: #b8625c;
}

.capital-input-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.capital-input-row input {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 4px 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #244a65;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
}

.capital-input-row b {
  padding-right: 6px;
  color: #79858b;
  font-size: 8px;
}

.budget-presets {
  display: grid;
  grid-template-columns: repeat(3,30px);
  border-left: 1px solid #dfe4e6;
}

.budget-presets button {
  padding: 0;
  border: 0;
  border-left: 1px solid #edf0f1;
  background: #f2f4f4;
  color: #596c78;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  cursor: pointer;
}

.budget-presets button:first-child {
  border-left: 0;
}

.budget-presets button:hover {
  background: #e6eef3;
  color: #245a80;
}

.deploy-budget-meta {
  min-height: 11px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding-top: 2px;
  color: #879197;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.deploy-budget-meta strong {
  color: #3b6076;
}

.deploy-budget-meta i {
  color: #a5adb1;
  font-style: normal;
}

.deploy-action-shell {
  min-width: 0;
}

.deploy-primary-button {
  width: 100%;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #2b5f89;
  background: linear-gradient(#4b86b5,#326c9b);
  color: #fff;
  font-size: 9px;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255,255,255,.22);
}

.deploy-primary-button:hover:not(:disabled) {
  background: linear-gradient(#568fbc,#3776a7);
}

.deploy-primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.deploy-primary-button:disabled {
  border-color: #7f8f99;
  background: linear-gradient(#aab3b8,#929da3);
  box-shadow: none;
}

.agent-layout-grid {
  min-height: calc(100vh - 175px);
  display: grid;
  grid-template-columns: minmax(0,1fr) 360px;
  background: #c5cdd1;
}

.agent-layout-main, .agent-layout-side {
  min-width: 0;
  min-height: 0;
}

.agent-layout-side {
  border-left: 1px solid #aeb8bd;
}

.workspace-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.panel-header {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-bottom: 1px solid #b8c1c6;
  background: linear-gradient(#f6f7f6,#e9ecec);
}

.panel-header > strong {
  color: #294c63;
  font-size: 10px;
}

.panel-badge {
  min-width: 18px;
  padding: 1px 5px;
  border: 1px solid #b8c2c7;
  background: #fff;
  color: #60717b;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  text-align: center;
}

.panel-spacer {
  flex: 1;
}

.panel-segment {
  display: flex;
  align-items: center;
  border: 1px solid #aab5ba;
  background: #f5f6f5;
}

.panel-segment button {
  min-width: 35px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border: 0;
  border-left: 1px solid #d4dade;
  background: transparent;
  color: #657781;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  cursor: pointer;
}

.panel-segment button:first-child {
  border-left: 0;
}

.panel-segment button:hover {
  background: #fff;
}

.panel-segment button.is-active {
  background: #dfeaf1;
  color: #235a7f;
  box-shadow: inset 0 0 0 1px #c9dbe6;
}

.panel-segment button.is-danger {
  color: #9a4c46;
}

.panel-segment .control-glyph {
  width: 11px;
  height: 11px;
}

.instances-panel {
  min-height: 0;
}

.instance-table-viewport {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #fbfcfb;
}

.agent-instance-head, .agent-instance-row {
  display: grid;
  grid-template-columns: 70px 76px 70px 72px 78px 72px minmax(92px,1fr) 56px;
  gap: 0;
  align-items: center;
}

.agent-instance-head {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 27px;
  border-bottom: 1px solid #cbd2d5;
  background: #eef1f1;
  color: #6d7b82;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.agent-instance-head > * {
  padding: 0 8px;
}

.agent-instance-head button {
  width: 100%;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.agent-instance-head button:hover, .agent-instance-head button.is-active {
  color: #245d82;
  background: #e5edf2;
}

.agent-instance-head button i {
  margin-left: auto;
  font-size: 6px;
  font-style: normal;
}

.agent-instance-list {
  min-height: 100%;
  background: repeating-linear-gradient(to bottom,#fff 0,#fff 41px,#fafbfa 41px,#fafbfa 82px);
}

.agent-instance-row {
  min-height: 41px;
  border-bottom: 1px solid #e4e8e9;
  color: #415a69;
  font-size: 9px;
  cursor: pointer;
}

.agent-instance-row > * {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-instance-row:hover {
  background: #f0f6f9;
}

.agent-instance-row.is-selected {
  background: #e2edf3;
  box-shadow: inset 3px 0 #3d7aa5;
}

.agent-instance-row.is-closed {
  color: #99a4a9;
  background: rgba(247,248,247,.78);
}

.agent-instance-row > code {
  color: #677983;
  font-size: 8px;
}

.agent-instance-row > strong {
  color: #214a66;
  font-size: 10px;
}

.agent-instance-row > b {
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.instance-strategy-cell b {
  color: #4e6e80;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #586d79;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.state-paused {
  color: #8b651f;
}

.state-closed {
  color: #909a9f;
}

.instance-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  opacity: 0;
}

.agent-instance-row:hover .instance-row-actions, .agent-instance-row.is-selected .instance-row-actions {
  opacity: 1;
}

.mini-icon-button {
  width: 23px;
  height: 23px;
}

.mini-icon-button .control-glyph {
  width: 10px;
  height: 10px;
}

.mini-icon-button.danger {
  color: #914a45;
}

.inspector-panel {
  background: #f7f8f7;
}

.inspector-panel-header {
  background: #edf0ef;
}

.inspector-id {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-id > strong {
  color: #254d67;
  font-size: 10px;
}

.inspector-process {
  color: #7a878e;
  font-size: 7px;
}

.inspector-market-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 8px 12px;
  padding: 12px 12px 9px;
  border-bottom: 1px solid #d8dfe1;
  background: #fff;
}

.inspector-symbol {
  min-width: 0;
}

.inspector-symbol strong {
  display: block;
  color: #174968;
  font-size: 23px;
  line-height: 1;
}

.inspector-symbol code {
  display: block;
  margin-top: 5px;
  color: #7e8a90;
  font-size: 8px;
}

.inspector-quote {
  text-align: right;
}

.inspector-quote strong {
  display: block;
  color: #224b65;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.inspector-quote em {
  display: block;
  margin-top: 4px;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.instance-sparkline {
  grid-column: 1 / -1;
  width: 100%;
  height: 54px;
  overflow: visible;
}

.instance-sparkline polyline {
  fill: none;
  stroke: #34764d;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.instance-sparkline.negative polyline {
  stroke: #a8524b;
}

.inspector-summary {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-bottom: 1px solid #d8dfe1;
  background: #f9faf9;
}

.inspector-summary span {
  min-width: 0;
  padding: 8px 9px;
  border-left: 1px solid #e2e6e8;
}

.inspector-summary span:first-child {
  border-left: 0;
}

.inspector-summary small, .inspector-summary strong {
  display: block;
}

.inspector-summary small {
  color: #7d898f;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.inspector-summary strong {
  margin-top: 4px;
  color: #294f67;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.inspector-summary em {
  color: #879196;
  font-size: 7px;
  font-style: normal;
  font-weight: 400;
}

.agent-runtime-list, .inspector-config {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #fff;
}

.agent-runtime-head, .agent-runtime-row {
  display: grid;
  grid-template-columns: 58px 48px minmax(70px,1fr) minmax(78px,1fr);
  gap: 7px;
  align-items: center;
}

.agent-runtime-head {
  min-height: 25px;
  padding: 0 9px;
  border-bottom: 1px solid #dce2e4;
  background: #eef1f1;
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.agent-runtime-row {
  min-height: 34px;
  padding: 0 9px;
  border-bottom: 1px solid #edf0f1;
  color: #536b79;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.agent-runtime-row:nth-child(odd) {
  background: #fbfcfb;
}

.agent-runtime-row time {
  color: #8b969b;
}

.agent-runtime-row b {
  color: #2c6286;
}

.agent-runtime-row code {
  justify-self: end;
  color: #294f67;
  font-size: 8px;
}

.inspector-config-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid #e9edee;
}

.inspector-config-row code {
  color: #63747e;
  font-size: 8px;
}

.inspector-config-row strong {
  color: #294e66;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.inspector-config-row em {
  color: #879298;
  font-size: 7px;
  font-style: normal;
  font-weight: 400;
}

.picker-popover {
  position: fixed;
  z-index: 951;
  overflow: hidden;
  border: 1px solid #7f919b;
  background: #fff;
  box-shadow: 0 10px 25px rgba(29,48,62,.24);
  pointer-events: auto;
}

.token-picker-popover {
  max-height: min(360px,calc(100vh - 24px));
}

.token-picker-toolbar {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid #b9c2c6;
  background: #edf0ef;
}

.token-picker-toolbar-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #496675;
  font-size: 8px;
  font-weight: 700;
}

.token-picker-toolbar code {
  color: #7c888f;
  font-size: 7px;
}

.token-picker-columns, .token-option {
  display: grid;
  grid-template-columns: minmax(190px,1fr) 100px 76px 76px;
  gap: 0;
  align-items: center;
}

.token-picker-columns {
  min-height: 24px;
  padding: 0 8px;
  border-bottom: 1px solid #d3dade;
  background: #f5f6f5;
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.token-picker-columns > * {
  padding: 0 7px;
}

.token-picker-list {
  max-height: 300px;
  overflow: auto;
}

.token-option {
  width: 100%;
  min-height: 43px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid #e5e9ea;
  background: #fff;
  color: #415c6b;
  text-align: left;
  cursor: pointer;
}

.token-option:last-child {
  border-bottom: 0;
}

.token-option:hover, .token-option.is-highlighted {
  background: #eef5f8;
}

.token-option.is-selected {
  background: #e3edf3;
  box-shadow: inset 3px 0 #3d7aa5;
}

.token-option > * {
  min-width: 0;
  padding: 0 7px;
}

.token-option-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #c1ccd1;
  background: #edf2f4;
  color: #2c6184;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 800;
}

.token-option-main {
  min-width: 0;
}

.token-option-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.token-option-title strong {
  color: #214a65;
  font-size: 10px;
}

.token-option-title span {
  overflow: hidden;
  color: #75828a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-option-main code {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #8b969b;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-badge {
  color: #2f8655;
  font-size: 8px;
  font-style: normal;
}

.token-option-price strong, .token-option-stat strong {
  display: block;
  color: #34576c;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.token-option-price em {
  display: block;
  margin-top: 2px;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.picker-empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: #819097;
}

.picker-empty-icon {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: fixed;
  z-index: 980;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(27,44,56,.32);
  pointer-events: auto;
}

.app-window {
  overflow: hidden;
  border: 1px solid #718792;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25,42,53,.28);
}

.window-titlebar {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px 0 9px;
  border-bottom: 1px solid #1e557d;
  background: linear-gradient(#477fac,#2f6792);
  color: #fff;
}

.window-titlebar > strong {
  font-size: 10px;
}

.window-title-spacer {
  flex: 1;
}

.window-title-meta {
  color: rgba(255,255,255,.72);
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.window-control-button {
  width: 22px;
  height: 22px;
  border-color: rgba(19,66,99,.8);
  background: rgba(255,255,255,.12);
  color: #fff;
  box-shadow: none;
}

.window-control-button:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}

.site-mini-footer {
  width: min(1180px, calc(100% - 24px));
  min-height: 28px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: #657984;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.site-mini-footer a {
  color: #496879;
  text-decoration: none;
}

.site-mini-footer a:hover {
  color: #174d70;
  text-decoration: underline;
}

.strategy-modal-window {
  width: min(780px,calc(100vw - 24px));
  height: min(560px,calc(100vh - 24px));
  display: flex;
  flex-direction: column;
}

.strategy-modal-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
}

.strategy-catalog-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #bec7cb;
  background: #eef1f1;
}

.strategy-search-box {
  min-height: 38px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  padding: 5px;
  border-bottom: 1px solid #cbd3d6;
  background: #e8ecec;
  color: #627580;
}

.strategy-search-box .control-glyph {
  justify-self: center;
  width: 12px;
  height: 12px;
}

.strategy-search-box input {
  min-width: 0;
  width: 100%;
  height: 26px;
  padding: 0 6px;
  border: 1px solid #a7b3b8;
  outline: 0;
  background: #fff;
  color: #2c4d61;
  font-size: 9px;
}

.strategy-catalog-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.strategy-catalog-item {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 16px;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 0;
  border-bottom: 1px solid #d7dddf;
  background: #f6f7f6;
  text-align: left;
  cursor: pointer;
}

.strategy-catalog-item:hover {
  background: #fff;
}

.strategy-catalog-item.is-selected {
  background: #dfeaf1;
  box-shadow: inset 3px 0 #3d79a3;
}

.strategy-catalog-code {
  color: #5d7482;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 800;
}

.strategy-catalog-copy {
  min-width: 0;
}

.strategy-catalog-copy strong, .strategy-catalog-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-catalog-copy strong {
  color: #254a63;
  font-size: 9px;
}

.strategy-catalog-copy small {
  margin-top: 2px;
  color: #828c91;
  font-size: 7px;
}

.strategy-catalog-check {
  display: grid;
  place-items: center;
  color: #2b6d9d;
}

.strategy-catalog-check .control-glyph {
  width: 10px;
  height: 10px;
}

.strategy-catalog-empty {
  min-height: 100px;
  display: grid;
  place-items: center;
  color: #879198;
}

.strategy-config-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.strategy-config-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid #d4dbde;
  background: #fbfcfb;
}

.strategy-config-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy-module-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #98aab4;
  background: #edf2f4;
  color: #2b6188;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 800;
}

.strategy-config-header h2 {
  margin: 0;
  color: #1f4862;
  font-size: 12px;
}

.strategy-config-header code {
  display: block;
  margin-top: 3px;
  color: #818c92;
  font-size: 7px;
}

.strategy-parameter-sections {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.strategy-parameter-section {
  border-bottom: 1px solid #dfe4e6;
}

.strategy-parameter-section-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-bottom: 1px solid #e1e5e7;
  background: #eef1f1;
}

.strategy-parameter-section-head strong {
  color: #667780;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.strategy-parameter {
  min-height: 42px;
  display: grid;
  grid-template-columns: 132px minmax(120px,1fr) 86px;
  align-items: center;
  gap: 10px;
  padding: 5px 9px;
  border-bottom: 1px solid #eceff0;
  background: #fff;
}

.strategy-parameter:last-child {
  border-bottom: 0;
}

.strategy-parameter.is-modified {
  background: #fffdf6;
}

.strategy-parameter-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.strategy-parameter-heading strong {
  overflow: hidden;
  color: #34556b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-parameter-heading em {
  color: #bd7e1e;
  font-size: 11px;
  font-style: normal;
}

.parameter-control-row {
  display: contents;
}

.parameter-track-shell {
  min-width: 0;
  display: flex;
  align-items: center;
}

.parameter-range {
  width: 100%;
  height: 18px;
  margin: 0;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: transparent;
  cursor: pointer;
}

.parameter-range::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg,#4d86b1 var(--parameter-fill),#dce2e5 var(--parameter-fill));
}

.parameter-range::-webkit-slider-thumb {
  width: 10px;
  height: 14px;
  margin-top: -5px;
  -webkit-appearance: none;
          appearance: none;
  border: 1px solid #85939a;
  background: #f8f9f8;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
}

.parameter-range::-moz-range-track {
  height: 3px;
  background: #dce2e5;
}

.parameter-range::-moz-range-progress {
  height: 3px;
  background: #4d86b1;
}

.parameter-range::-moz-range-thumb {
  width: 10px;
  height: 14px;
  border: 1px solid #85939a;
  background: #f8f9f8;
}

.parameter-input-shell {
  height: 27px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #a5b0b5;
  background: #fff;
}

.parameter-input-shell input {
  min-width: 0;
  width: 100%;
  height: 25px;
  padding: 0 5px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #2a4e66;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 700;
}

.parameter-input-shell em {
  padding-right: 5px;
  color: #7d898f;
  font-size: 7px;
  font-style: normal;
}

.strategy-modal-footer {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-top: 1px solid #c5cdd1;
  background: #ecefef;
}

.strategy-modal-footer-spacer {
  flex: 1;
}

.command-button {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #9da9af;
  background: linear-gradient(#fff,#eef0ef);
  color: #4f6775;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px #fff;
}

.command-button:hover {
  border-color: #738995;
  background: #fff;
}

.icon-command-button {
  width: 28px;
  padding: 0;
}

.command-button-primary {
  border-color: #2d628c;
  background: linear-gradient(#4b86b5,#326c9b);
  color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.2);
}

.command-button-danger {
  border-color: #9b5d58;
  background: linear-gradient(#c4766f,#a54f48);
  color: #fff;
}

.compact-modal-backdrop {
  z-index: 990;
}

.compact-dialog {
  width: min(320px,100%);
}

.compact-dialog-body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px;
}

.compact-amount-input {
  height: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #a2aeb4;
  background: #fff;
}

.compact-amount-input input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 7px;
  border: 0;
  outline: 0;
  color: #284c64;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
}

.compact-amount-input b {
  padding-right: 6px;
  color: #7a868c;
  font-size: 7px;
}

.compact-dialog-value {
  color: #65757f;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.compact-dialog-footer {
  min-height: 36px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 6px;
  border-top: 1px solid #d0d6d8;
  background: #ecefef;
}

.close-dialog-value {
  min-height: 70px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
}

.close-dialog-value strong {
  color: #8f443e;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.close-dialog-value span {
  color: #73808a;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.agent-toast {
  position: fixed;
  z-index: 1000;
  right: 12px;
  bottom: 12px;
  min-width: 140px;
  min-height: 31px;
  display: grid;
  grid-template-columns: auto 1fr 20px;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 9px;
  border: 1px solid #78909f;
  background: #f9faf9;
  box-shadow: 0 6px 18px rgba(8,30,76,.18);
  color: #3e5f73;
}

.agent-toast strong {
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.agent-toast button {
  width: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b878e;
  cursor: pointer;
}

.agent-toast.is-warn {
  border-color: #b99963;
  background: #fff9eb;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #aab5bb #eef1f1;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #eef1f1;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #eef1f1;
  background: #aab5bb;
}

@media (max-width: 1050px) {
  .desktop-content {
    width: calc(100% - 16px);
  }
  .agent-overview-main {
    grid-template-columns: 1fr auto;
  }
  .agent-header-stats {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .agent-deploy-grid {
    grid-template-columns: 1fr 1fr;
  }
  .deploy-action-shell {
    align-self: end;
  }
  .agent-layout-grid {
    grid-template-columns: minmax(0,1fr) 330px;
  }
}

@media (max-width: 840px) {
  .agent-layout-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .agent-layout-side {
    border-left: 0;
    border-top: 1px solid #aeb8bd;
  }
  .instances-panel {
    min-height: 360px;
  }
  .inspector-panel {
    min-height: 390px;
  }
}

@media (max-width: 680px) {
  .desktop-content {
    width: calc(100% - 10px);
    padding-top: 38px;
  }
  .deskbar {
    padding: 0 8px;
  }
  .agent-overview-main {
    gap: 7px;
    padding: 7px;
  }
  .agent-header-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .agent-header-stats > span:nth-child(odd) {
    border-left: 0;
  }
  .agent-deploy-grid {
    grid-template-columns: 1fr;
  }
  .deploy-action-shell .deploy-field-code {
    display: none;
  }
  .agent-instance-head, .agent-instance-row {
    grid-template-columns: 58px 58px 56px 64px 68px minmax(84px,1fr) 48px;
  }
  .agent-instance-head > :nth-child(6), .agent-instance-row > :nth-child(6) {
    display: none;
  }
  .agent-instance-head > :nth-child(7), .agent-instance-row > :nth-child(7) {
    grid-column: 6;
  }
  .agent-instance-head > :nth-child(8), .agent-instance-row > :nth-child(8) {
    grid-column: 7;
  }
  .instance-row-actions {
    opacity: 1;
  }
  .token-picker-columns, .token-option {
    grid-template-columns: minmax(180px,1fr) 92px 70px;
  }
  .token-picker-columns > :last-child, .token-option > :last-child {
    display: none;
  }
  .strategy-modal-body {
    grid-template-columns: 185px minmax(0,1fr);
  }
  .strategy-parameter {
    grid-template-columns: 115px minmax(100px,1fr) 80px;
    gap: 7px;
  }
}

@media (max-width: 500px) {
  .agent-instance-head, .agent-instance-row {
    grid-template-columns: 52px 50px 50px 60px minmax(82px,1fr) 42px;
  }
  .agent-instance-head > :nth-child(4), .agent-instance-row > :nth-child(4) {
    display: none;
  }
  .agent-instance-head > :nth-child(5), .agent-instance-row > :nth-child(5) {
    grid-column: 4;
  }
  .agent-instance-head > :nth-child(7), .agent-instance-row > :nth-child(7) {
    grid-column: 5;
  }
  .agent-instance-head > :nth-child(8), .agent-instance-row > :nth-child(8) {
    grid-column: 6;
  }
  .strategy-modal-window {
    height: calc(100vh - 12px);
  }
  .strategy-modal-body {
    grid-template-columns: 1fr;
  }
  .strategy-catalog-pane {
    max-height: 150px;
  }
  .strategy-parameter {
    grid-template-columns: 1fr 82px;
  }
  .strategy-parameter-heading {
    grid-column: 1 / -1;
  }
}

.desktop-content {
  width: min(1160px, calc(100% - 20px));
  padding: 39px 0 16px;
}

.agent-shell {
  border-color: #8d9aa1;
  box-shadow: 0 4px 14px rgba(34,50,61,.12), inset 0 1px #fff;
}

.operations-band {
  border-bottom-color: #9faab0;
}

.agent-overview-main {
  min-height: 43px;
  grid-template-columns: minmax(270px,1fr) auto auto;
  gap: 9px;
  padding: 5px 9px;
}

.agent-identity {
  gap: 7px;
}

.agent-code {
  margin: 0;
  font-size: 8px;
}

.agent-name-block {
  display: flex;
  align-items: center;
  min-width: 0;
}

.agent-name-block code {
  display: none;
}

.agent-wallet-short {
  min-width: 0;
  overflow: hidden;
  color: #8a959a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-name-button {
  max-width: 240px;
  font-size: 14px;
  white-space: nowrap;
}

.agent-header-stats {
  border: 0;
  background: transparent;
}

.agent-header-stats > span {
  min-width: 78px;
  padding: 1px 11px;
  border-left: 1px solid #d7dddf;
}

.agent-header-stats > span:first-child {
  border-left: 1px solid #d7dddf;
}

.agent-header-stats small {
  font-size: 7px;
}

.agent-header-stats strong {
  margin-top: 2px;
  font-size: 11px;
}

.agent-header-stats em {
  font-size: 7px;
}

.toolbar-icon-button {
  width: 26px;
  height: 26px;
}

.agent-util-track {
  display: none;
}

.deploy-panel {
  border-top: 1px solid #e1e6e8;
}

.agent-deploy-grid {
  min-height: 47px;
  grid-template-columns: 50px minmax(230px,1.15fr) minmax(220px,1fr) minmax(210px,.78fr) 82px;
  gap: 7px;
  align-items: center;
  padding: 6px 9px;
}

.deploy-ticket-mark {
  color: #355e76;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
}

.deploy-field-code {
  display: none;
}

.deploy-budget-shell {
  position: relative;
  padding-bottom: 9px;
}

.control-combobox, .strategy-select-control, .capital-control {
  height: 31px;
}

.control-combobox {
  grid-template-columns: 29px minmax(0,1fr) 7px 25px;
}

.control-trigger {
  width: 25px;
  height: 29px;
}

.strategy-select-control {
  grid-template-columns: 29px minmax(0,1fr) 24px;
}

.capital-input-row input {
  height: 29px;
  font-size: 10px;
}

.budget-presets {
  grid-template-columns: repeat(3,29px);
}

.deploy-budget-meta {
  position: absolute;
  right: 1px;
  bottom: 0;
  min-height: 0;
  padding: 0;
  font-size: 7px;
}

.deploy-primary-button {
  height: 31px;
  font-size: 8px;
}

.agent-layout-grid {
  height: min(520px, calc(100vh - 132px));
  min-height: 380px;
  grid-template-columns: minmax(0,1fr) 324px;
}

.panel-header {
  min-height: 28px;
  padding: 0 7px;
}

.panel-header > strong {
  font-size: 10px;
}

.panel-segment button {
  min-width: 33px;
  height: 21px;
  padding: 0 6px;
}

.agent-instance-head, .agent-instance-row {
  grid-template-columns: 66px minmax(112px,1fr) minmax(118px,1fr) 72px 82px 72px 88px 48px;
}

.agent-instance-head {
  min-height: 25px;
  font-size: 7px;
}

.agent-instance-head > * {
  padding: 0 7px;
}

.agent-instance-head button {
  height: 24px;
  padding: 0 7px;
}

.agent-instance-head > :nth-child(4), .agent-instance-head > :nth-child(5), .agent-instance-head > :nth-child(6) {
  text-align: right;
  justify-content: flex-end;
}

.agent-instance-list {
  min-height: 100%;
  background: repeating-linear-gradient(to bottom,#fff 0,#fff 37px,#e9edef 37px,#e9edef 38px);
}

.agent-instance-row {
  min-height: 38px;
  background: rgba(255,255,255,.97);
  font-size: 9px;
}

.agent-instance-row > * {
  padding: 0 7px;
}

.agent-instance-row > :nth-child(4), .agent-instance-row > :nth-child(5), .agent-instance-row > :nth-child(6) {
  text-align: right;
}

.agent-instance-row > b {
  font-variant-numeric: tabular-nums;
}

.instance-token-cell strong, .instance-token-cell small, .instance-strategy-cell b, .instance-strategy-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instance-token-cell strong {
  color: #214a66;
  font-size: 10px;
}

.instance-token-cell small {
  margin-top: 2px;
  color: #879399;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.instance-strategy-cell b {
  color: #4d6e80;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.instance-strategy-cell small {
  margin-top: 2px;
  color: #879399;
  font-size: 7px;
}

.instance-row-actions {
  gap: 3px;
}

.mini-icon-button {
  width: 21px;
  height: 21px;
}

.inspector-market-head {
  min-height: 72px;
  grid-template-columns: auto auto minmax(96px,1fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}

.inspector-symbol strong {
  font-size: 20px;
}

.inspector-symbol code {
  margin-top: 5px;
  font-size: 7px;
}

.inspector-quote strong {
  font-size: 11px;
}

.inspector-quote em {
  margin-top: 4px;
  font-size: 8px;
}

.instance-sparkline {
  grid-column: auto;
  width: 100%;
  height: 42px;
}

.inspector-summary span {
  padding: 7px 8px;
}

.agent-runtime-head, .agent-runtime-row {
  grid-template-columns: 52px 38px minmax(58px,1fr) minmax(72px,1fr);
  gap: 7px;
}

.agent-runtime-head {
  min-height: 24px;
  padding: 0 8px;
}

.agent-runtime-row {
  min-height: 31px;
  padding: 0 8px;
}

.inspector-config-row {
  min-height: 33px;
  padding: 0 9px;
}

.token-picker-popover {
  max-width: min(560px,calc(100vw - 18px));
}

.token-picker-columns, .token-option {
  grid-template-columns: minmax(190px,1fr) 92px 72px 72px;
}

.strategy-modal-window {
  width: min(740px,calc(100vw - 20px));
  height: min(520px,calc(100vh - 20px));
}

.strategy-modal-body {
  grid-template-columns: 205px minmax(0,1fr);
}

.strategy-parameter {
  min-height: 39px;
  grid-template-columns: 124px minmax(110px,1fr) 82px;
  gap: 8px;
  padding: 4px 8px;
}

@media (max-width: 1050px) {
  .agent-overview-main {
    grid-template-columns: minmax(230px,1fr) auto;
  }
  .agent-header-stats {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-end;
    border-top: 1px solid #e1e5e7;
    padding-top: 4px;
  }
  .agent-header-stats > span:first-child {
    border-left: 0;
  }
  .agent-deploy-grid {
    grid-template-columns: 44px 1fr 1fr;
  }
  .deploy-budget-shell {
    grid-column: 2;
  }
  .deploy-action-shell {
    grid-column: 3;
    align-self: center;
  }
  .agent-layout-grid {
    grid-template-columns: minmax(0,1fr) 310px;
  }
}

@media (max-width: 840px) {
  .agent-layout-grid {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .agent-layout-side {
    border-left: 0;
    border-top: 1px solid #aeb8bd;
  }
  .instances-panel {
    min-height: 360px;
  }
  .inspector-panel {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .desktop-content {
    width: calc(100% - 10px);
    padding-top: 36px;
  }
  .agent-overview-main {
    gap: 6px;
    padding: 6px;
  }
  .agent-wallet-short {
    display: none;
  }
  .agent-header-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .agent-header-stats > span {
    border-left: 1px solid #d7dddf;
  }
  .agent-header-stats > span:nth-child(odd) {
    border-left: 0;
  }
  .agent-deploy-grid {
    grid-template-columns: 1fr;
  }
  .deploy-ticket-mark {
    display: none;
  }
  .deploy-budget-shell, .deploy-action-shell {
    grid-column: auto;
  }
  .agent-instance-head, .agent-instance-row {
    grid-template-columns: 58px minmax(82px,1fr) 68px 64px 68px 82px 44px;
  }
  .agent-instance-head > :nth-child(3), .agent-instance-row > :nth-child(3) {
    display: none;
  }
  .agent-instance-head > :nth-child(4), .agent-instance-row > :nth-child(4) {
    grid-column: 3;
  }
  .agent-instance-head > :nth-child(5), .agent-instance-row > :nth-child(5) {
    grid-column: 4;
  }
  .agent-instance-head > :nth-child(6), .agent-instance-row > :nth-child(6) {
    grid-column: 5;
  }
  .agent-instance-head > :nth-child(7), .agent-instance-row > :nth-child(7) {
    grid-column: 6;
  }
  .agent-instance-head > :nth-child(8), .agent-instance-row > :nth-child(8) {
    grid-column: 7;
  }
  .instance-row-actions {
    opacity: 1;
  }
  .token-picker-columns, .token-option {
    grid-template-columns: minmax(180px,1fr) 88px 66px;
  }
  .token-picker-columns > :last-child, .token-option > :last-child {
    display: none;
  }
  .strategy-modal-body {
    grid-template-columns: 175px minmax(0,1fr);
  }
}

@media (max-width: 500px) {
  .agent-instance-head, .agent-instance-row {
    grid-template-columns: 52px minmax(74px,1fr) 60px 64px 78px 42px;
  }
  .agent-instance-head > :nth-child(4), .agent-instance-row > :nth-child(4) {
    display: none;
  }
  .agent-instance-head > :nth-child(5), .agent-instance-row > :nth-child(5) {
    grid-column: 3;
  }
  .agent-instance-head > :nth-child(6), .agent-instance-row > :nth-child(6) {
    grid-column: 4;
  }
  .agent-instance-head > :nth-child(7), .agent-instance-row > :nth-child(7) {
    grid-column: 5;
  }
  .agent-instance-head > :nth-child(8), .agent-instance-row > :nth-child(8) {
    grid-column: 6;
  }
  .strategy-modal-window {
    height: calc(100vh - 12px);
  }
  .strategy-modal-body {
    grid-template-columns: 1fr;
  }
  .strategy-catalog-pane {
    max-height: 145px;
  }
  .strategy-parameter {
    grid-template-columns: 1fr 80px;
  }
  .strategy-parameter-heading {
    grid-column: 1 / -1;
  }
}

.render-boundary-host {
  display: contents;
}
.inspector-log-output {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 10px;
  background: #13212b;
  color: #d7e2e8;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.inspector-log-error {
  margin-top: 10px;
  color: #ffb1ab;
}

.deskbar-inner {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.deskbar-agents {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.deskbar-agents::-webkit-scrollbar {
  display: none;
}

.agent-link {
  min-width: 0;
  max-width: 150px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(19, 63, 97, 0.5);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  color: #f7fbfd;
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-link:hover,
.agent-link.is-active {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 720px) {
  .deskbar-inner {
    gap: 6px;
  }

  .deskbar-agents {
    gap: 3px;
  }

  .agent-link {
    max-width: 88px;
    padding: 0 6px;
  }
}
.agent-create {
  min-width: 24px;
  padding-inline: 7px;
  cursor: pointer;
}

.agent-create:disabled {
  opacity: 0.5;
  cursor: default;
}

.agent-overview-main {
  grid-template-columns: minmax(420px, 1fr) auto;
  gap: 16px;
  padding: 7px 10px;
}

.agent-identity {
  align-items: flex-start;
}

.agent-identity-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agent-code,
.agent-header-actions,
.agent-wallet-short {
  display: none;
}

.agent-name-button {
  max-width: 360px;
  font-size: 16px;
}

.agent-wallet-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.agent-wallet-line code {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #4f6673;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-copy-button {
  width: 22px;
  height: 20px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid #b7c1c6;
  background: #f7f9f9;
  color: #42647a;
  cursor: pointer;
}

.wallet-copy-button:hover {
  background: #fff;
  color: #174d70;
}

.agent-header-stats > span {
  min-width: 92px;
}

.capital-input-row {
  grid-template-columns: auto minmax(64px, 1fr) auto;
}

.capital-input-row small {
  padding-left: 7px;
  color: #849097;
  font-family: "Courier New", monospace;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .04em;
}

.capital-input-row input {
  padding-left: 7px;
}

.budget-presets {
  grid-template-columns: repeat(3, 38px);
}

.budget-presets button {
  font-size: 7px;
}

.deploy-budget-meta {
  gap: 5px;
  font-size: 6px;
}

.deploy-budget-meta span,
.deploy-budget-meta strong {
  letter-spacing: .02em;
}

.instances-empty {
  min-height: 160px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: #7b8a92;
  text-align: center;
}

.instances-empty strong {
  color: #35566b;
  font-size: 11px;
}

.instances-empty span {
  font-size: 8px;
}

.instance-token-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.instance-token-cell > span:last-child {
  min-width: 0;
  display: grid;
}

.token-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid #bdc8cd;
  border-radius: 50%;
  background: #eef2f3;
  color: #325f79;
  font-family: "Courier New", monospace;
  font-weight: 800;
}

.token-avatar img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.token-avatar b {
  z-index: 1;
  font-size: 7px;
}

.token-avatar-mini {
  width: 20px;
  height: 20px;
}

.token-avatar-row {
  width: 28px;
  height: 28px;
}

.token-avatar-large {
  width: 34px;
  height: 34px;
}

.token-avatar-large b {
  font-size: 9px;
}

.inspector-symbol {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-symbol > span {
  min-width: 0;
  display: grid;
}

.home-route {
  min-height: calc(100vh - 38px);
  display: block;
  padding: 44px 18px 10px;
  background: #e6ebed;
}

.home-dashboard {
  width: min(1120px, 100%);
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #9aa8af;
  background: #f8f9f8;
  box-shadow: 0 4px 16px rgba(34, 50, 61, .12);
}

.home-agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 8px;
  padding: 10px;
}

.home-agent-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 11px;
  border: 1px solid #c1c9cd;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.home-agent-card:hover {
  border-color: #6f91a7;
  box-shadow: inset 0 0 0 1px #dbe8ef;
}

.home-agent-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.home-agent-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab3b7;
}

.home-agent-status.is-running {
  background: #34a861;
}

.home-agent-card-head strong {
  overflow: hidden;
  color: #173f5a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-agent-card-head code {
  color: #859198;
  font-size: 7px;
}

.home-agent-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #e1e5e7;
}

.home-agent-card-stats span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 7px 0;
  border-left: 1px solid #e1e5e7;
}

.home-agent-card-stats span:first-child {
  padding-left: 0;
  border-left: 0;
}

.home-agent-card-stats small {
  color: #8b969b;
  font-family: "Courier New", monospace;
  font-size: 6px;
}

.home-agent-card-stats b {
  color: #35586c;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.home-error {
  margin: 10px;
  padding: 8px 10px;
  border: 1px solid #cf918c;
  background: #fff2f0;
  color: #8d3530;
  font-size: 9px;
}

.home-loading-state,
.home-empty-state {
  min-height: 240px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: #74858e;
  text-align: center;
}

.home-loading-state strong,
.home-empty-state strong {
  color: #173f5a;
  font-size: 15px;
}

.home-loading-state span,
.home-empty-state span {
  font-size: 9px;
}

.home-stats-footer {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0;
  border-top: 1px solid #bcc6ca;
  background: #edf1f2;
  color: #687b85;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.home-stats-footer span {
  padding: 0 12px;
  border-left: 1px solid #cfd6da;
}

.home-stats-footer span:first-child {
  border-left: 0;
}

.home-stats-footer strong {
  color: #254f68;
}

@media (max-width: 920px) {
  .agent-overview-main {
    grid-template-columns: 1fr;
  }

  .agent-header-stats {
    justify-self: stretch;
  }

  .agent-wallet-line code {
    max-width: calc(100vw - 90px);
  }

  .home-agent-card-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-stats-footer {
    flex-wrap: wrap;
    gap: 4px 0;
    padding-block: 6px;
  }
}



.parameter-control-row.is-number-only {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
}

.parameter-control-row.is-number-only .parameter-input-shell {
  width: min(220px, 100%);
}

#tooltip-root {
  position: fixed;
  z-index: 1000;
  inset: 0;
  pointer-events: none;
}

.tooltip-portal {
  position: fixed;
  z-index: 1001;
  transform: translateX(-50%);
  width: -moz-max-content;
  width: max-content;
  max-width: min(220px, calc(100vw - 24px));
  padding: 5px 7px;
  border: 1px solid #1e3f69;
  border-radius: 2px;
  background: #fffde1;
  color: #18283b;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(24, 40, 59, 0.18);
}

.home-main-grid {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
  border-bottom: 1px solid #bcc6ca;
}

.home-main-grid > .home-agent-grid {
  align-content: start;
  border-right: 1px solid #bcc6ca;
}

.home-stream {
  min-width: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  background: #f7f9f9;
}

.home-stream-list {
  min-height: 180px;
  max-height: 320px;
  flex: 1;
  overflow: auto;
}

.home-stream-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px 38px minmax(78px, 1fr) 62px minmax(72px, auto);
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border-bottom: 1px solid #e0e5e7;
  color: #61747e;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.home-stream-row time,
.home-stream-row code,
.home-stream-row strong,
.home-stream-row b,
.home-stream-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-stream-row a {
  color: #174b69;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.home-stream-row strong {
  color: #254f68;
}

.trade-side {
  justify-self: start;
  min-width: 32px;
  padding: 2px 4px;
  border: 1px solid #bfc8cc;
  text-align: center;
  font-size: 7px;
}

.trade-side.is-buy {
  border-color: #91b9a2;
  background: #eef7f1;
  color: #23784a;
}

.trade-side.is-sell {
  border-color: #c9a6a2;
  background: #fff1ef;
  color: #a44942;
}

.home-stream-row code {
  color: #374f5d;
  text-align: right;
}

.home-stream-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #9aa6ac;
}

@media (max-width: 900px) {
  .home-main-grid {
    grid-template-columns: 1fr;
  }

  .home-main-grid > .home-agent-grid {
    border-right: 0;
    border-bottom: 1px solid #bcc6ca;
  }

  .home-stream {
    min-height: 260px;
  }
}

.strategy-modal-window {
  width: min(860px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 32px));
}

.strategy-modal-body {
  grid-template-columns: 210px minmax(0, 1fr);
}

.strategy-catalog-pane {
  background: #f3f5f5;
}

.strategy-catalog-item {
  min-height: 52px;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
}

.strategy-config-header {
  min-height: 58px;
}

.strategy-parameter-section-head {
  min-height: 22px;
}

.strategy-parameter {
  min-height: 54px;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 11px;
}

.parameter-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.parameter-track-shell {
  flex: 1 1 180px;
}

.parameter-value-stack {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.parameter-value-stack > small {
  min-width: 54px;
  color: #657984;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.parameter-input-shell {
  width: 190px;
  flex: 0 0 auto;
}

.parameter-control-row.is-number-only .parameter-value-stack {
  margin-right: auto;
}

.parameter-control-row.is-number-only .parameter-input-shell {
  width: 220px;
}

.parameter-presets {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.parameter-presets button {
  min-width: 34px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid #b4bec3;
  background: #f7f8f7;
  color: #60737e;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  cursor: pointer;
}

.parameter-presets button:hover,
.parameter-presets button.is-selected {
  border-color: #4b7ea2;
  background: #e3edf3;
  color: #285f86;
}

@media (max-width: 760px) {
  .strategy-modal-body {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .strategy-parameter {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .parameter-control-row {
    flex-wrap: wrap;
  }
}

.home-loading-state i {
  width: 14px;
  height: 14px;
  border: 2px solid #bfcbd2;
  border-top-color: #2d6e9e;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

.strategy-modal-window {
  width: min(980px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 32px));
}

.strategy-modal-body {
  grid-template-columns: 230px minmax(0, 1fr);
}

.strategy-config-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 10px;
}

.strategy-config-identity {
  min-width: 0;
  flex: 1;
}

.strategy-detail-tabs {
  display: flex;
  align-items: center;
  border: 1px solid #aab5ba;
  background: #f5f6f5;
}

.strategy-detail-tabs button {
  height: 26px;
  min-width: 54px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid #d4dade;
  background: transparent;
  color: #667984;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  cursor: pointer;
}

.strategy-detail-tabs button:first-child {
  border-left: 0;
}

.strategy-detail-tabs button:hover {
  background: #fff;
  color: #245d82;
}

.strategy-detail-tabs button.is-active {
  background: #dfeaf1;
  color: #235a7f;
  box-shadow: inset 0 0 0 1px #c9dbe6;
}

.strategy-manifest-grid {
  display: flex;
  flex-direction: column;
}

.strategy-manifest-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(150px, .72fr) minmax(330px, 1.5fr);
  gap: 18px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e0e5e7;
  background: #fffdf8;
}

.strategy-manifest-row:last-child {
  border-bottom: 0;
}

.strategy-manifest-row-copy {
  min-width: 0;
}

.strategy-manifest-row-copy > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.strategy-manifest-row-copy strong {
  color: #244b64;
  font-size: 10px;
}

.strategy-manifest-row-copy i,
.strategy-value-label i {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #aebbc2;
  border-radius: 50%;
  background: #f8faf9;
  color: #5f7b8b;
  font-family: Georgia, serif;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  cursor: help;
}

.strategy-manifest-row-copy > small {
  display: block;
  margin-top: 4px;
  color: #74838a;
  font-size: 8px;
  line-height: 1.35;
}

.strategy-manifest-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: end;
}

.strategy-manifest-fields.is-paired {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.strategy-value-field {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
}

.strategy-value-label {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5d717d;
}

.strategy-value-label small {
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.strategy-value-label i {
  width: 12px;
  height: 12px;
  font-size: 7px;
}

.strategy-value-input {
  min-width: 0;
  height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 1 1 150px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #a9b7be;
  background: #fff;
}

.strategy-value-field.is-modified .strategy-value-input {
  border-color: #c48926;
}

.strategy-value-input input {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #244a65;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}

.strategy-value-input em {
  padding: 0 8px 0 4px;
  color: #73828a;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.strategy-value-hint {
  min-width: 44px;
  color: #526c7b;
  font-family: "Courier New", monospace;
  font-size: 7px;
  white-space: nowrap;
}

.strategy-value-presets {
  width: 100%;
  justify-content: flex-end;
  margin: 2px 0 0;
}

.strategy-about-pane,
.strategy-source-pane {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 18px;
  background: #fffdf8;
}

.strategy-about-pane h3 {
  margin: 0 0 8px;
  color: #244b64;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.strategy-about-pane p {
  max-width: 720px;
  margin: 0;
  color: #526873;
  font-size: 10px;
  line-height: 1.6;
}

.strategy-about-pane dl {
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0 0;
  border: 1px solid #ccd4d8;
  background: #fff;
}

.strategy-about-pane dl > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #e1e5e7;
}

.strategy-about-pane dl > div:nth-child(odd) {
  border-right: 1px solid #e1e5e7;
}

.strategy-about-pane dt,
.strategy-about-pane dd {
  margin: 0;
  padding: 0 8px;
  font-size: 8px;
}

.strategy-about-pane dt {
  color: #73828a;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.strategy-about-pane dd {
  overflow: hidden;
  color: #294d64;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-source-pane {
  padding: 0;
  background: #17232b;
}

.strategy-source-pane pre {
  min-width: -moz-max-content;
  min-width: max-content;
  margin: 0;
  padding: 16px 18px;
  color: #d7e3e8;
  font-size: 9px;
  line-height: 1.55;
  -moz-tab-size: 2;
    -o-tab-size: 2;
       tab-size: 2;
}

.strategy-source-pane code {
  font: inherit;
}

.agent-wallet-line {
  gap: 4px;
}

.wallet-auth-button {
  color: #7b633e;
}

.auth-key-dialog {
  width: min(500px, calc(100vw - 32px));
}

.auth-key-dialog-copy {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: #fffaf0;
}

.auth-key-dialog-copy > .control-glyph {
  width: 28px;
  height: 28px;
  color: #9a6818;
}

.auth-key-dialog-copy strong {
  color: #5a421d;
  font-size: 11px;
}

.auth-key-dialog-copy p {
  margin: 7px 0 10px;
  color: #6c604d;
  font-size: 9px;
  line-height: 1.5;
}

.auth-key-dialog-copy code {
  display: block;
  overflow: hidden;
  padding: 7px;
  border: 1px solid #d8ccb7;
  background: #fff;
  color: #425b68;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .strategy-modal-body {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .strategy-config-header {
    align-items: stretch;
    flex-direction: column;
    padding: 8px 10px;
  }

  .strategy-manifest-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .strategy-manifest-fields.is-paired,
  .strategy-about-pane dl {
    grid-template-columns: 1fr;
  }

  .strategy-about-pane dl > div:nth-child(odd) {
    border-right: 0;
  }
}
.agent-layout-grid.is-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.strategy-catalog-copy em {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: #667984;
  font-size: 7px;
  font-style: normal;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.strategy-catalog-item {
  min-height: 68px;
  align-items: start;
  padding-block: 8px;
}

.strategy-catalog-code,
.strategy-catalog-check {
  margin-top: 2px;
}

.strategy-about-sections {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin-top: 18px;
}

.strategy-about-section {
  border: 1px solid #ccd4d8;
  background: #fff;
}

.strategy-about-section > strong {
  display: block;
  padding: 6px 9px;
  border-bottom: 1px solid #dce2e5;
  background: #edf2f4;
  color: #345a70;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.strategy-about-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 14px;
  align-items: center;
  padding: 9px;
  border-bottom: 1px solid #e5e9eb;
}

.strategy-about-row:last-child {
  border-bottom: 0;
}

.strategy-about-row > span {
  min-width: 0;
}

.strategy-about-row b,
.strategy-about-row small {
  display: block;
}

.strategy-about-row b {
  color: #294d64;
  font-size: 9px;
}

.strategy-about-row small {
  margin-top: 3px;
  color: #6e7f88;
  font-size: 8px;
  line-height: 1.4;
}

.strategy-about-row code {
  color: #174f72;
  font-size: 8px;
  font-weight: 700;
  text-align: right;
}

.auth-key-dialog {
  width: min(620px, calc(100vw - 32px));
}

.auth-key-dialog-copy {
  align-items: start;
}

.agent-secret-field {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.agent-secret-field > span {
  color: #7c6d55;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.agent-secret-field code,
.agent-secret-field textarea {
  width: 100%;
  min-width: 0;
  padding: 7px;
  border: 1px solid #d8ccb7;
  background: #fff;
  color: #304d5d;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.agent-secret-field code {
  overflow: auto;
  text-overflow: clip;
  white-space: nowrap;
}

.agent-secret-field textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.45;
  word-break: break-all;
}

.agent-secret-field .command-button {
  justify-self: start;
}

.access-dialog-footer {
  align-items: center;
}

@media (max-width: 780px) {
  .strategy-about-row {
    grid-template-columns: 1fr;
  }

  .strategy-about-row code {
    text-align: left;
  }
}

.delete-agent-dialog {
  width: min(520px, calc(100vw - 32px));
}

.delete-agent-copy {
  padding: 16px;
  background: #fff7f5;
}

.delete-agent-copy > strong {
  color: #7e302a;
  font-size: 11px;
}

.delete-agent-copy p {
  margin: 7px 0 12px;
  color: #685c59;
  font-size: 9px;
  line-height: 1.5;
}

.delete-agent-copy label {
  display: grid;
  gap: 4px;
}

.delete-agent-copy label > span {
  color: #8a625f;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.delete-agent-destination {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #c9aaa6;
  background: #fff;
  color: #304d5d;
  font-family: "Courier New", monospace;
  font-size: 9px;
}


.agent-trades-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #fff;
}

.agent-trades-head, .agent-trades-row {
  display: grid;
  grid-template-columns: 58px 42px minmax(70px,1fr) 72px 72px;
  gap: 7px;
  align-items: center;
}

.agent-trades-head {
  min-height: 25px;
  padding: 0 9px;
  border-bottom: 1px solid #dce2e4;
  background: #eef1f1;
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.agent-trades-row {
  min-height: 34px;
  padding: 0 9px;
  border-bottom: 1px solid #edf0f1;
  color: #536b79;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.agent-trades-row:nth-child(odd) {
  background: #fbfcfb;
}

.agent-trades-row time {
  color: #8b969b;
}

.agent-trades-row code, .agent-trades-row strong {
  justify-self: end;
}

.agent-trades-empty {
  padding: 18px 9px;
  color: #8b969b;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-align: center;
}

@media (max-width: 720px) {
  .agent-trades-head, .agent-trades-row {
    grid-template-columns: 50px 36px minmax(58px,1fr) 62px 62px;
    gap: 6px;
  }
}
.command-button-primary:hover:not(:disabled) {
  border-color: #244f72;
  background: linear-gradient(#4b86b5,#326c9b);
  color: #fff;
}

.command-button-danger:hover:not(:disabled) {
  border-color: #844b46;
  background: linear-gradient(#c4766f,#a54f48);
  color: #fff;
}

.instance-table-viewport {
  min-width: 0;
  overflow-x: hidden;
}

.agent-instance-head,
.agent-instance-row {
  width: 100%;
  min-width: 0;
  grid-template-columns: 62px minmax(116px,1.25fr) minmax(104px,1fr) 66px 70px minmax(82px,.8fr) 46px;
}

.agent-instance-head > :nth-child(4),
.agent-instance-head > :nth-child(5),
.agent-instance-row > :nth-child(4),
.agent-instance-row > :nth-child(5) {
  text-align: right;
  justify-content: flex-end;
}

.agent-instance-row > * {
  min-width: 0;
}

.instance-token-cell > span,
.instance-strategy-cell {
  min-width: 0;
  overflow: hidden;
}

.instance-token-cell strong,
.instance-token-cell small,
.instance-strategy-cell b,
.instance-strategy-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-summary {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.inspector-ca-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.inspector-ca-row > small {
  flex: 0 0 auto;
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.inspector-ca-row > code {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  color: #637782;
  font-size: 7px;
  line-height: 1.2;
}

.inspector-ca-copy {
  flex: 0 0 auto;
}

.agent-trades-head,
.agent-trades-row {
  grid-template-columns: 58px 44px minmax(70px,1fr) 78px;
}

.trade-action {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.trade-action.is-buy {
  color: var(--green);
}

.trade-action.is-sell {
  color: var(--red);
}

.home-stream-row {
  grid-template-columns: 54px minmax(0,1fr);
  gap: 8px;
}

.home-stream-row time {
  color: #8b969b;
}

.home-stream-sentence {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #61747e;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.home-stream-sentence a,
.home-stream-sentence code,
.home-stream-sentence span {
  display: inline;
  overflow: visible;
  white-space: inherit;
}

.home-stream-sentence a {
  color: #174b69;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
}

.home-stream-sentence a:hover {
  text-decoration: underline;
}

.home-stream-sentence .home-stream-token {
  color: #23784a;
}

.home-stream-sentence code {
  color: #374f5d;
  font-size: inherit;
  text-align: left;
}

@media (max-width: 900px) {
  .agent-instance-head,
  .agent-instance-row {
    grid-template-columns: 58px minmax(104px,1fr) 64px 68px minmax(78px,.8fr) 44px;
  }

  .agent-instance-head > :nth-child(3),
  .agent-instance-row > :nth-child(3) {
    display: none !important;
  }

  .agent-instance-head > :nth-child(4),
  .agent-instance-row > :nth-child(4) {
    display: flex !important;
    grid-column: auto !important;
  }

  .agent-instance-head > :nth-child(5),
  .agent-instance-row > :nth-child(5) {
    display: flex !important;
    grid-column: auto !important;
  }

  .agent-instance-head > :nth-child(6),
  .agent-instance-row > :nth-child(6) {
    display: inline-flex !important;
    grid-column: auto !important;
  }

  .agent-instance-head > :nth-child(7),
  .agent-instance-row > :nth-child(7) {
    display: flex !important;
    grid-column: auto !important;
  }
}

@media (max-width: 560px) {
  .agent-instance-head,
  .agent-instance-row {
    grid-template-columns: 52px minmax(88px,1fr) 64px 76px 42px;
  }

  .agent-instance-head > :nth-child(4),
  .agent-instance-row > :nth-child(4) {
    display: none !important;
  }

  .agent-instance-head > :nth-child(5),
  .agent-instance-row > :nth-child(5) {
    display: flex !important;
    grid-column: auto !important;
  }

  .agent-instance-head > :nth-child(6),
  .agent-instance-row > :nth-child(6) {
    display: inline-flex !important;
    grid-column: auto !important;
  }

  .agent-instance-head > :nth-child(7),
  .agent-instance-row > :nth-child(7) {
    display: flex !important;
    grid-column: auto !important;
  }

  .agent-trades-head,
  .agent-trades-row {
    grid-template-columns: 50px 38px minmax(58px,1fr) 66px;
    gap: 6px;
  }
}

.inspector-market-head {
  grid-template-columns: minmax(0, 1fr) auto minmax(82px, 118px);
  grid-template-rows: 1fr;
  align-items: center;
}

.inspector-symbol {
  min-width: 0;
  overflow: hidden;
}

.inspector-symbol > span {
  min-width: 0;
  overflow: hidden;
}

.inspector-symbol strong,
.inspector-symbol > span > code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-ca-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 22px;
  width: 100%;
}

.inspector-ca-row > code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-runtime-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #cfd7da;
  background: #f3f6f6;
}

.inspector-runtime-strip > span {
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px;
  border-left: 1px solid #dce2e4;
}

.inspector-runtime-strip > span:first-child {
  border-left: 0;
}

.inspector-runtime-strip small,
.inspector-runtime-strip strong,
.inspector-runtime-strip em {
  display: block;
  min-width: 0;
}

.inspector-runtime-strip small {
  color: #7d898f;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.inspector-runtime-strip strong {
  margin-top: 4px;
  overflow: hidden;
  color: #294f67;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-runtime-strip em {
  margin-top: 3px;
  overflow: hidden;
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-runtime-strip .decision-buy {
  color: #23784a;
}

.inspector-runtime-strip .decision-sell {
  color: #a44942;
}

.inspector-runtime-strip .decision-hold,
.inspector-runtime-strip .decision-wait {
  color: #a86f18;
}

.inspector-error-banner {
  padding: 7px 9px;
  border-bottom: 1px solid #d6aaa5;
  background: #fff1ef;
  color: #8d3932;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.inspector-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: #edf1f2;
}

.inspector-section {
  min-height: 0;
  margin-top: 6px;
  border-top: 1px solid #bcc6ca;
  border-bottom: 1px solid #bcc6ca;
  background: #fff;
}

.inspector-section:first-child {
  margin-top: 0;
  border-top: 0;
}

.inspector-section > header {
  min-height: 25px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-bottom: 1px solid #d7dfe2;
  background: #eef2f2;
}

.inspector-section > header strong {
  color: #285674;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.inspector-section > header span {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #849096;
  font-family: "Courier New", monospace;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-section .inspector-config,
.inspector-section .agent-trades-list,
.inspector-section .inspector-log-output {
  flex: none;
  overflow: auto;
}

.inspector-section .inspector-config {
  max-height: 190px;
}

.inspector-section .agent-trades-list {
  max-height: 170px;
}

.inspector-section .inspector-log-output {
  min-height: 110px;
  max-height: 230px;
}

@media (max-width: 420px) {
  .inspector-market-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .instance-sparkline {
    display: none;
  }

  .inspector-runtime-strip {
    grid-template-columns: 1fr;
  }

  .inspector-runtime-strip > span {
    min-height: 40px;
    border-left: 0;
    border-top: 1px solid #dce2e4;
  }

  .inspector-runtime-strip > span:first-child {
    border-top: 0;
  }
}

.inspector-section .inspector-config-row {
  min-height: 28px;
  padding: 0 8px;
}

.inspector-section .inspector-config {
  max-height: 120px;
}

.inspector-section .agent-trades-list {
  max-height: 100px;
}

.inspector-section .inspector-log-output {
  min-height: 82px;
  max-height: 120px;
}

.inspector-summary {
  grid-template-columns: repeat(5,minmax(0,1fr));
}

.inspector-summary > span {
  overflow: hidden;
}

.inspector-summary strong,
.inspector-summary em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-runtime-strip .execution-ready,
.inspector-runtime-strip .execution-waiting {
  color: #2d6897;
}

.inspector-runtime-strip .execution-executing {
  color: #23784a;
}

.inspector-runtime-strip .execution-idle,
.inspector-runtime-strip .execution-complete {
  color: #65757f;
}

.inspector-runtime-strip .execution-blocked {
  color: #a86f18;
}

.inspector-runtime-strip .execution-failed {
  color: #a44942;
}

.inspector-data-actions {
  display: flex;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid #cfd7da;
  background: #f7f9f9;
}

.inspector-data-actions .command-button {
  min-height: 27px;
}

.inspector-data-actions b {
  min-width: 16px;
  margin-left: 3px;
  padding: 1px 4px;
  border: 1px solid #c8d1d5;
  background: #fff;
  color: #58707e;
  font-family: "Courier New", monospace;
  font-size: 7px;
}

.inspector-data-dialog {
  width: min(980px,calc(100vw - 36px));
  max-height: min(760px,calc(100vh - 36px));
  display: flex;
  flex-direction: column;
}

.inspector-data-dialog-body,
.logs-modal-output {
  min-height: 160px;
  flex: 1;
  overflow: auto;
  background: #fff;
}

.trade-modal-table {
  min-width: 880px;
}

.trade-modal-head,
.trade-modal-row {
  display: grid;
  grid-template-columns: 112px 48px 92px 100px 94px 86px 94px minmax(190px,1fr);
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
}

.trade-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #cfd7da;
  background: #eef2f2;
  color: #7b878d;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
}

.trade-modal-row {
  border-bottom: 1px solid #edf0f1;
  color: #536b79;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.trade-modal-row:nth-child(odd) {
  background: #fbfcfb;
}

.trade-modal-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-modal-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #7c898f;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.logs-dialog {
  width: min(900px,calc(100vw - 36px));
}

.logs-modal-output {
  padding: 0;
  background: #10202a;
}

.logs-modal-output pre {
  min-height: 100%;
  margin: 0;
  padding: 12px;
  overflow: visible;
  color: #d8e4e9;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.logs-modal-output .inspector-log-error {
  min-height: 0;
  border-top: 1px solid #6e3d39;
  background: #271817;
  color: #f2c2bd;
}

@media (max-width: 760px) {
  .inspector-summary {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .inspector-summary span:nth-child(odd) {
    border-left: 0;
  }

  .inspector-data-actions {
    flex-wrap: wrap;
  }
}

.inspector-id > em {
  margin-left: 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
}

.inspector-market-head-clean {
  grid-template-columns: minmax(0, 1fr) auto 110px;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
}

.inspector-symbol-clean {
  min-width: 0;
  align-items: flex-start;
}

.inspector-symbol-clean > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.inspector-symbol-clean strong {
  overflow: visible;
  max-width: none;
  white-space: normal;
  text-overflow: clip;
  line-height: 1.05;
}

.inspector-symbol-clean b {
  color: var(--ink);
  font-size: 13px;
}

.inspector-symbol-clean > span > code {
  overflow: visible;
  max-width: none;
  white-space: normal;
  text-overflow: clip;
}

.inspector-symbol-clean .inspector-ca-row {
  min-width: 0;
}

.inspector-symbol-clean .inspector-ca-row code {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-quote-clean {
  min-width: 110px;
}

.inspector-quote-clean em {
  display: block;
  margin-top: 3px;
}

.inspector-summary-clean {
  display: flex;
  grid-template-columns: none;
}

.inspector-summary-clean > span {
  flex: 1 1 0;
  min-width: 0;
}

.inspector-summary-clean strong {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}

.inspector-activity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.inspector-activity strong {
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.inspector-activity.is-bad strong {
  color: var(--red);
}

.inspector-error-banner {
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.inspector-error-banner strong {
  font-size: 10px;
  text-transform: uppercase;
}

.inspector-error-banner span {
  overflow-wrap: anywhere;
  white-space: normal;
}

.inspector-data-actions-clean {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inspector-data-actions-clean .command-button {
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

.inspector-config-header-clean {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
}

.inspector-config-header-clean > span {
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

.inspector-config-header-clean > em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
  white-space: normal;
}

.logs-dialog .window-titlebar > strong {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .inspector-market-head-clean {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .inspector-market-head-clean .instance-sparkline {
    display: none;
  }

  .inspector-data-actions-clean {
    grid-template-columns: 1fr;
  }
}

.agent-layout-grid {
  grid-template-columns: minmax(0, 1fr) clamp(420px, 30vw, 500px);
}

.inspector-market-head-clean {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 48px;
  gap: 10px 14px;
  align-items: start;
  padding: 14px 14px 10px;
}

.inspector-symbol-clean {
  grid-column: 1;
  min-width: 0;
  overflow: visible;
}

.inspector-symbol-clean > span {
  min-width: 0;
  overflow: visible;
}

.inspector-symbol-clean strong {
  margin: 0;
  font-size: 18px;
  line-height: 1.08;
  overflow: visible;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.inspector-token-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.inspector-token-meta b {
  flex: 0 0 auto;
  font-size: 11px;
}

.inspector-token-meta code {
  min-width: 0;
  color: #6d7d86;
  font-size: 9px;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.inspector-quote-clean {
  grid-column: 2;
  min-width: 116px;
  align-self: center;
  text-align: right;
}

.inspector-quote-clean strong {
  font-size: 14px;
}

.inspector-market-head-clean .instance-sparkline {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  height: 48px;
}

.inspector-summary-clean {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inspector-summary-clean > span {
  min-width: 0;
  border-left: 1px solid #e2e6e8;
}

.inspector-summary-clean > span:first-child {
  border-left: 0;
}

.inspector-summary-clean strong {
  white-space: normal;
  overflow: visible;
  word-break: normal;
  overflow-wrap: break-word;
}

.inspector-data-actions-clean {
  display: flex;
  gap: 7px;
}

.inspector-data-actions-clean .command-button {
  flex: 1 1 0;
  min-width: 0;
}

.inspector-config-header-clean {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.inspector-config-header-clean > em {
  grid-column: auto;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .agent-layout-grid {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
}

@media (max-width: 840px) {
  .agent-layout-grid {
    grid-template-columns: 1fr;
  }

  .inspector-market-head-clean {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .inspector-market-head-clean .instance-sparkline {
    display: block;
  }
}

@media (max-width: 520px) {
  .inspector-market-head-clean {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 42px;
  }

  .inspector-quote-clean {
    grid-column: 1;
    text-align: left;
  }

  .inspector-market-head-clean .instance-sparkline {
    grid-row: 3;
  }

  .inspector-summary-clean {
    grid-template-columns: 1fr;
  }

  .inspector-summary-clean > span {
    border-left: 0;
    border-top: 1px solid #e2e6e8;
  }

  .inspector-summary-clean > span:first-child {
    border-top: 0;
  }

  .inspector-data-actions-clean {
    flex-wrap: wrap;
  }

  .inspector-data-actions-clean .command-button {
    flex-basis: calc(50% - 4px);
  }
}

.inspector-summary-clean {
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
}

.inspector-summary-clean small {
  font-size: 8px;
  letter-spacing: .02em;
}

.inspector-summary-clean strong {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.15;
}

.inspector-summary-clean > span > em {
  display: block;
  margin-top: 2px;
  font-size: 8px;
}

.inspector-summary-clean .is-market-cap strong {
  color: #123f5a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.inspector-config-header-clean {
  grid-template-columns: auto minmax(0, 1fr);
}

.inspector-config-header-clean > span {
  justify-self: end;
  text-align: right;
}

.inspector-data-dialog {
  width: min(1120px, calc(100vw - 32px));
}

.trade-history-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #344f5f;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.trade-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid #c8d2d6;
  background: #eef2f2;
  color: #6f7f87;
  font-size: 8px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.trade-history-table td {
  height: 46px;
  padding: 6px 12px;
  border-bottom: 1px solid #e7ecee;
  vertical-align: middle;
}

.trade-history-table tbody tr:nth-child(even) {
  background: #fafbfb;
}

.trade-history-table tbody tr:hover {
  background: #f2f7f8;
}

.trade-history-table th:nth-child(1),
.trade-history-table td:nth-child(1) {
  width: 126px;
}

.trade-history-table th:nth-child(2),
.trade-history-table td:nth-child(2) {
  width: 62px;
}

.trade-history-table th:nth-child(3),
.trade-history-table td:nth-child(3) {
  width: 140px;
}

.trade-history-table th:nth-child(4),
.trade-history-table td:nth-child(4) {
  width: 150px;
}

.trade-history-table th:nth-child(5),
.trade-history-table td:nth-child(5),
.trade-history-table th:nth-child(6),
.trade-history-table td:nth-child(6) {
  width: 126px;
}

.trade-history-table td code,
.trade-history-table td strong,
.trade-history-table td time {
  font-size: 10px;
}

.trade-history-table td small {
  display: block;
  margin-top: 2px;
  color: #8a969c;
  font-size: 7px;
  line-height: 1.1;
}

.trade-history-table .trade-action {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  padding: 3px 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 8px;
}

.trade-history-table .trade-token-qty strong {
  display: block;
  color: #183f57;
}

.trade-history-table .trade-signature {
  display: inline-flex;
  max-width: 170px;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: #56717f;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-history-table a.trade-signature:hover {
  color: #1f5279;
  text-decoration: underline;
}

.trade-history-table .trade-signature code {
  color: inherit;
}

.trade-history-table .trade-signature span {
  flex: 0 0 auto;
  font-size: 9px;
}

@media (max-width: 760px) {
  .inspector-summary-clean {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspector-summary-clean > span:nth-child(3) {
    border-left: 0;
  }
}

.instance-holding {
  color: #294f67;
  font-weight: 700;
}


@media (min-width: 901px) {
  .home-dashboard { height: calc(100dvh - 102px); overflow: hidden; }
  .home-main-grid { overflow: hidden; }
  .home-main-grid > .home-agent-grid { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
  .home-stream { min-height: 0; align-self: stretch; max-height: none; overflow: hidden; }
  .home-stream-list { min-height: 0; max-height: none; overscroll-behavior-y: contain; }
}

/* Fit position targets and accounting inside the existing panel. */
.instance-table-viewport { overflow-x: hidden; container-type: inline-size; }
.agent-instance-head, .agent-instance-row {
  width: 100%;
  min-width: 0;
  grid-template-columns: 58px minmax(82px,1fr) 42px 86px 58px 84px 88px 70px 44px;
}
.agent-instance-head > *, .agent-instance-row > * {
  display: flex !important;
  grid-column: auto !important;
  min-width: 0;
  padding-inline: 4px;
}
.agent-instance-head > :nth-child(n+4):nth-child(-n+7),
.agent-instance-row > :nth-child(n+4):nth-child(-n+7) {
  justify-content: flex-end;
  text-align: right;
}
.agent-instance-head button { padding-inline: 4px; }
.agent-instance-row > code { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.instance-target { white-space: nowrap; font-size: 9px; }
.instance-strategy-cell { justify-content: center; }
.agent-instance-row .state-badge { font-size: 8px; padding-inline: 3px; gap: 3px; }
@container (max-width: 640px) {
  .agent-instance-head, .agent-instance-row {
    grid-template-columns: minmax(70px,1.3fr) minmax(70px,1.15fr) minmax(48px,.8fr) minmax(62px,1fr) minmax(65px,1.05fr) 44px;
  }
  .agent-instance-head > :nth-child(1), .agent-instance-row > :nth-child(1),
  .agent-instance-head > :nth-child(3), .agent-instance-row > :nth-child(3),
  .agent-instance-head > :nth-child(8), .agent-instance-row > :nth-child(8) { display: none !important; }
  .agent-instance-row .token-avatar { display: none; }
}
.position-history { grid-column: 1 / -1; width: 100%; margin-top: 12px; }
.position-history-track > div, .position-history-time { display: flex; justify-content: space-between; gap: 8px; font: 10px "Courier New", monospace; }
.position-history-track { margin-bottom: 8px; }
.position-history-track svg { width: 100%; height: 60px; display: block; border-bottom: 1px solid #dde5e8; }
.position-history-track polyline { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.position-history-time { color: #6f7f87; font-size: 9px; }
.trade-history-table { min-width: 1080px; }
.trade-history-table th:nth-child(4), .trade-history-table td:nth-child(4) { width: 108px; }
.trade-history-table th:nth-child(5), .trade-history-table td:nth-child(5) { width: 150px; }
.trade-history-table th:nth-child(6), .trade-history-table td:nth-child(6),
.trade-history-table th:nth-child(7), .trade-history-table td:nth-child(7) { width: 126px; }

.home-agents-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #bcc6ca; overflow: hidden; }
.home-agents-panel > .home-agent-grid { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior-y: contain; align-content: start; }
.home-agent-filters { display: flex; align-items: center; gap: 6px; padding: 10px; border-bottom: 1px solid #d9e0e3; }
.home-agent-filters button { padding: 5px 10px; border: 1px solid #c1c9cd; background: #f8fafb; color: #526775; font: 11px "Courier New", monospace; cursor: pointer; }
.home-agent-filters button[aria-pressed="true"] { background: #285d7b; border-color: #285d7b; color: #fff; font-weight: 700; box-shadow: inset 0 -2px rgba(0,0,0,.16); }
.home-agent-filters > span { margin-left: auto; color: #6f7f87; font: 10px "Courier New", monospace; }
@media (max-width: 900px) { .home-agents-panel { border-right: 0; border-bottom: 1px solid #bcc6ca; } }

/* Position holdings and capital are separate; P&L uses USD. */
.agent-instance-head, .agent-instance-row { grid-template-columns: 46px minmax(70px,1fr) 32px 76px 50px 74px 74px 60px 60px 60px 44px; }
.agent-instance-head > :nth-child(n+4):nth-child(-n+9), .agent-instance-row > :nth-child(n+4):nth-child(-n+9) { justify-content: flex-end; text-align: right; }
.agent-instance-head { font-size: 8px; }
.agent-instance-row > code { font-size: 9px; }
@container (max-width:640px) {
  .agent-instance-head, .agent-instance-row { grid-template-columns: minmax(60px,1fr) minmax(65px,1fr) minmax(45px,.7fr) minmax(58px,.9fr) minmax(58px,.9fr) minmax(52px,.8fr) minmax(52px,.8fr) 44px; }
  .agent-instance-head > :nth-child(8), .agent-instance-row > :nth-child(8) { display: flex !important; }
  .agent-instance-head > :nth-child(10), .agent-instance-row > :nth-child(10) { display: none !important; }
}
.inspector-panel { overflow-y: auto; min-height: 0; }
.inspector-panel > * { flex-shrink: 0; }
.inspector-market-head-clean { grid-template-rows: auto; }
.inspector-quote-clean .inspector-cap { display:block; font-size:22px; color:#254d67; margin-top:5px; }
.inspector-summary-clean { grid-template-columns: repeat(6,minmax(0,1fr)); }
.inspector-summary-clean > span { padding:8px 4px; }
.inspector-summary-clean small { font-size:7px; }
.inspector-summary-clean strong { font-size:9px; }
.inspector-summary-clean em { font-size:8px; }
.inspector-panel > .position-history { margin:0; padding:12px 14px; box-sizing:border-box; height:auto; min-height:240px; background:white; }
.position-history-track { min-height:70px; }
.decision-heartbeat { margin-left:auto; white-space:nowrap; color:#6d7d86; font-size:9px; }
.inspector-activity .library-led.on { animation:heartbeat-pulse 2s ease-in-out infinite; }
@keyframes heartbeat-pulse { 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { .inspector-activity .library-led.on { animation:none; } }
.agent-header-stats { display:flex; flex-wrap:wrap; gap:12px; }
.agent-header-stats > span { min-width:80px; }
.agent-header-stats strong { font-size:12px; }
 .wallet-deposit-button { color:#254d67; background:#edf3f6; border-color:#9eb3be; }
.wallet-deposit-button .control-glyph { display:block; }
.deposit-dialog { width:min(360px,calc(100vw - 32px)); }
.deposit-body { padding:18px 22px 20px; display:flex; flex-direction:column; align-items:center; gap:14px; background:#f8fafb; }
.deposit-heading { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.deposit-heading > strong { font-size:13px; color:#254d67; }
.deposit-heading > span { padding:3px 7px; border:1px solid #c4d4cc; background:#edf5f0; color:#416853; font-size:10px; }
.deposit-qr-frame { display:flex; align-items:center; justify-content:center; max-width:100%; padding:0; background:white; border:1px solid #d5dee3; }
.deposit-qr-frame img { display:block; image-rendering:pixelated; max-width:100%; height:auto; }
.deposit-body p { margin:0; font-size:12px; line-height:1.5; text-align:center; color:#526775; }
.deposit-body p strong { color:#254d67; }
.deposit-address { align-self:stretch; padding:10px 12px; border:1px solid #d5dee3; background:white; }
.deposit-address small { display:block; margin-bottom:6px; font-size:8px; letter-spacing:.06em; color:#758792; }
.deposit-address code { display:block; font-size:11px; line-height:1.6; overflow-wrap:anywhere; color:#354f60; }
.deposit-copy-button { align-self:stretch; display:flex; justify-content:center; align-items:center; gap:7px; padding:9px 12px; border:1px solid #8ca4b2; background:#e3edf3; color:#254d67; font-size:11px; font-weight:700; cursor:pointer; }
.deposit-copy-button:hover { background:#d8e6ef; }
.deposit-copy-button:focus-visible { outline:2px solid #4b88ac; outline-offset:2px; }
.deposit-note { font-size:10px; line-height:1.4; color:#758792; text-align:center; }

.withdrawal-body { align-items: stretch; }
.withdrawal-body label { display: grid; gap: 6px; font-size: 11px; color: #526775; }
.withdrawal-body input { width: 100%; box-sizing: border-box; padding: 9px; border: 1px solid #b8c8d1; background: #fff; font: 12px monospace; }
.withdrawal-body [role="alert"] { color: #a34435; }

.wallet-delete-button { margin-left: 8px; color: #9a5047; }

/* Keep the desktop Trade controls together without oversized minimum tracks. */
@media (min-width: 760px) {
  .agent-deploy-grid { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(195px,.85fr) 82px; gap: 6px; align-items: center; }
  .deploy-ticket-mark { display: none; }
  .deploy-budget-shell, .deploy-action-shell { grid-column: auto; align-self: center; }
  .deploy-budget-shell { padding-bottom: 0; }
  .capital-control { min-width: 0; }
}
.agent-header-stats { flex-wrap: nowrap; gap: 0; }
.agent-header-stats > span { min-width: 0; padding: 4px 8px; white-space: nowrap; }
.agent-header-stats strong { font-size: 11px; }
@media (max-width: 759px) {
  .agent-deploy-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .deploy-ticket-mark { display: none; }
  .deploy-budget-shell, .deploy-action-shell { grid-column: auto; }
  .agent-header-stats { flex-wrap: wrap; }
}
.home-stream-sentence strong { display: inline; color: #174b69; font: inherit; font-weight: 700; white-space: inherit; }

/* In-product Mement chat */
.agent-main-area.has-chat {
  display: grid;
  grid-template-columns: clamp(280px, 24vw, 380px) minmax(0, 1fr);
}

.agent-tab-column {
  min-width: 0;
}

.chat-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #aeb8bd;
  background: #f3f6f7;
}

.agent-main-area.has-chat > .chat-panel {
  position: sticky;
  top: 0;
  height: calc(100vh - 140px);
  min-height: 420px;
  max-height: 100%;
}

.chat-panel-header {
  flex: 0 0 auto;
}

.chat-panel-header > small {
  max-width: 60%;
  overflow: hidden;
  color: #657983;
  font-family: "Courier New", monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-messages {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  background: #f3f6f7;
  scroll-behavior: smooth;
}

.chat-empty {
  max-width: 460px;
  margin: auto;
  padding: 16px 18px;
  border: 1px dashed #b9c5ca;
  background: #fbfcfb;
  color: #6c7e88;
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.chat-message {
  width: min(86%, 540px);
  display: grid;
  gap: 4px;
}

.chat-message > span {
  color: #7a8990;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .06em;
}

.chat-message > div {
  padding: 9px 10px;
  border: 1px solid #c8d1d5;
  background: #fff;
  color: #294a5d;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.is-user {
  align-self: flex-end;
}

.chat-message.is-user > span {
  text-align: right;
}

.chat-message.is-user > div {
  border-color: #9db5c4;
  background: #eaf2f6;
}

.chat-message.is-assistant {
  align-self: flex-start;
}

.chat-activity {
  min-height: 28px;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #d3dade;
  background: #f9fbfb;
  color: #657983;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.chat-confirmation {
  width: min(94%, 560px);
  align-self: center;
  padding: 11px;
  border: 1px solid #8ca7b7;
  background: #f8fbfc;
  box-shadow: 0 3px 10px rgba(34,50,61,.08);
}

.chat-confirmation.is-danger {
  border-color: #b67a74;
  background: #fff8f6;
}

.chat-confirmation-kicker {
  margin-bottom: 5px;
  color: #6e8794;
  font-family: "Courier New", monospace;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
}

.chat-confirmation.is-danger .chat-confirmation-kicker {
  color: #98524b;
}

.chat-confirmation > strong {
  display: block;
  color: #214b63;
  font-size: 11px;
}

.chat-confirmation.is-danger > strong {
  color: #86443f;
}

.chat-confirmation > p {
  margin: 6px 0 10px;
  color: #5f727c;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-confirmation-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-error {
  width: min(94%, 560px);
  align-self: center;
  padding: 8px 10px;
  border: 1px solid #c89b96;
  background: #fff4f2;
  color: #8a3e37;
  font-size: 9px;
  line-height: 1.45;
}

.chat-jump-latest {
  position: sticky;
  bottom: 2px;
  align-self: center;
  padding: 5px 9px;
  border: 1px solid #9dabb2;
  background: #fff;
  color: #46677a;
  font-family: "Courier New", monospace;
  font-size: 8px;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(34,50,61,.12);
}

.chat-composer {
  flex: 0 0 auto;
  padding: 8px;
  border-top: 1px solid #cbd3d6;
  background: #ecefef;
}

.chat-composer textarea {
  width: 100%;
  min-height: 76px;
  max-height: 190px;
  display: block;
  resize: vertical;
  padding: 8px;
  border: 1px solid #9caab1;
  outline: 0;
  background: #fff;
  color: #294b5e;
  font: 10px/1.45 Tahoma, Verdana, "Segoe UI", sans-serif;
}

.chat-composer textarea:focus-visible {
  outline: 1px dotted #184f79;
  outline-offset: 2px;
}

.chat-composer textarea:disabled {
  background: #f5f6f6;
  color: #7d898f;
}

.chat-composer-actions {
  min-height: 34px;
  display: flex;
  align-items: end;
  gap: 4px;
  padding-top: 6px;
}


@media (max-width: 900px) {
  .agent-main-area.has-chat {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-main-area.has-chat > .chat-panel {
    position: static;
    height: 420px;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #aeb8bd;
  }
}

@media (max-width: 620px) {
  .chat-message {
    width: 94%;
  }

  .chat-messages {
    padding: 10px;
  }

  .chat-confirmation,
  .chat-error {
    width: 100%;
  }
}

/* Agent page: full width and fitted to the viewport. The positions list scrolls
   inside its panel and the inspector charts shrink to the remaining height, so
   the page itself never scrolls. */
.desktop-content.agent-desktop { width: calc(100% - 24px); max-width: none; }
.agent-desktop .agent-shell:not(.route-loading) { height: calc(100vh - 52px); min-height: 520px; display: flex; flex-direction: column; }
.agent-desktop .agent-main-area { flex: 1; min-height: 0; display: flex; }
.agent-desktop .agent-main-area.has-chat { display: grid; grid-template-rows: minmax(0, 1fr); }
.agent-desktop .agent-main-area.has-chat > .chat-panel { position: static; height: auto; min-height: 0; }
.agent-desktop .agent-tab-column { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.agent-desktop .agent-tab-workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.agent-desktop .agent-layout-grid { flex: 1; height: auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.agent-desktop .agent-layout-side { overflow: hidden; }
.agent-desktop .inspector-panel { height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.agent-desktop .inspector-panel > .position-history { flex: 1 1 auto; min-height: 96px; display: flex; flex-direction: column; padding: 8px 12px; }
.agent-desktop .position-history-track { flex: 1 1 0; min-height: 28px; margin-bottom: 4px; display: flex; flex-direction: column; }
.agent-desktop .position-history-track svg { flex: 1; height: auto; min-height: 16px; }
.agent-desktop .inspector-panel > .inspector-scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
@media (max-width: 900px) {
  .agent-desktop .agent-shell:not(.route-loading) { height: auto; }
  .agent-desktop .agent-main-area { display: block; }
  .agent-desktop .agent-main-area.has-chat > .chat-panel { height: 380px; }
  .agent-desktop .agent-layout-grid { height: 640px; }
}
.chat-confirmation-settings { margin: 0 0 10px; display: grid; gap: 2px; }
.chat-confirmation-settings > div { display: flex; justify-content: space-between; gap: 8px; font-size: 9px; }
.chat-confirmation-settings dt { color: #6e8794; }
.chat-confirmation-settings dd { margin: 0; color: #214b63; font-weight: 700; }
/* Below the token picker (951) and strategy picker (980), which open on top of it. */
.deploy-modal-backdrop { z-index: 940; }
.deploy-dialog { width: min(1100px, calc(100vw - 32px)); }
.withdraw-amount-row { display: flex; gap: 6px; align-items: stretch; }
.withdraw-amount-row > input { flex: 1; min-width: 0; }
/* New position modal: one field per row with room to breathe, not the compact toolbar row. */
.deploy-dialog { width: min(520px, calc(100vw - 32px)); }
.deploy-dialog .operations-band { padding: 14px 16px 16px; border: 0; background: transparent; }
.deploy-dialog .agent-deploy-grid { grid-template-columns: minmax(0,1fr); gap: 10px; align-items: stretch; min-height: 0; padding: 0; }
.deploy-dialog .deploy-ticket-mark { display: none; }
.deploy-dialog .deploy-field-shell,
.deploy-dialog .deploy-budget-shell,
.deploy-dialog .deploy-action-shell { grid-column: 1 / -1; min-width: 0; padding-bottom: 0; }
.deploy-dialog .capital-control { grid-template-columns: minmax(0,1fr) auto; }
.deploy-dialog .capital-input-row input { height: 40px; font-size: 13px; }
.deploy-dialog .capital-input-row small { padding-left: 10px; }
.deploy-dialog .budget-presets { grid-template-columns: repeat(3,44px); }
.deploy-dialog .budget-presets button { font-size: 9px; }
.deploy-dialog .deploy-primary-button { height: 42px; font-size: 11px; margin-top: 4px; }
/* Positions tab: the tab names the list, so its header row only holds filters. */
.positions-filter-bar { gap: 6px; }
.positions-filter-bar .panel-segment { margin-left: 0; }
/* Connection status line at the bottom of the agent page. */
.connection-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding: 4px 12px; color: #6e8794; font: 700 9px "Courier New", monospace; }
.connection-status > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
/* Shortened contract address under the token name; click copies it. */
.instance-token-ca { cursor: copy; font-family: "Courier New", monospace; }
.instance-token-ca:hover { color: #245a80; text-decoration: underline; }
/* Close running positions below a market cap. */
.close-below { display: inline-flex; align-items: center; gap: 3px; }
.close-below input { width: 34px; height: 20px; padding: 0 4px; border: 1px solid #c3cdd2; font: 700 9px "Courier New", monospace; text-align: right; }
.close-below small { color: #6e8794; font: 700 8px "Courier New", monospace; }
.close-dialog-list { list-style: none; margin: 6px 0; padding: 0; max-height: 180px; overflow: auto; display: grid; gap: 2px; }
.close-dialog-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; font-size: 10px; }
/* Slippage next to the budget in the New position modal. */
/* Pump token launch */
.launch-link { flex: 0 0 auto; letter-spacing: .08em; }
.launch-shell {
  min-height: calc(100dvh - 30px);
  padding: 54px 16px 48px;
  box-sizing: border-box;
  display: grid;
  place-items: start center;
  background: #e8edf0;
}
.launch-window { width: min(760px, 100%); overflow: hidden; }
.launch-window > .window-titlebar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.launch-window > .window-titlebar span { font: 8px "Courier New", monospace; opacity:.78; }
.launch-form { background:#f7f9fa; }
.launch-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:18px; }
.launch-field { min-width:0; display:grid; gap:5px; color:#506774; font-size:9px; font-weight:700; letter-spacing:.05em; }
.launch-field > span { font-family:"Courier New",monospace; }
.launch-field input, .launch-field textarea, .launch-field select {
  width:100%; box-sizing:border-box; min-height:34px; padding:8px 9px;
  border:1px solid #b8c6cd; background:white; color:#203746; font:12px Tahoma,Verdana,sans-serif;
}
.launch-field textarea { resize:vertical; line-height:1.45; }
.launch-field input[type="file"] { padding:5px; font-size:10px; }
.launch-field small { color:#7b8990; font-size:8px; font-weight:400; letter-spacing:0; overflow-wrap:anywhere; }
.launch-wide { grid-column:1 / -1; }
.launch-amount { display:flex; align-items:stretch; }
.launch-amount input { min-width:0; border-right:0; }
.launch-amount b { display:grid; place-items:center; padding:0 10px; border:1px solid #b8c6cd; background:#edf2f4; color:#526775; font:9px "Courier New",monospace; }
.launch-risk { margin:0 18px 14px; padding:10px 12px; display:flex; gap:10px; align-items:flex-start; border:1px solid #d2b28c; background:#fff8eb; color:#735536; font-size:10px; line-height:1.45; }
.launch-risk strong { flex:0 0 auto; font:9px "Courier New",monospace; letter-spacing:.06em; }
.launch-message { margin:0 18px 14px; padding:10px 12px; border:1px solid #b9c7ce; background:white; font-size:10px; line-height:1.45; }
.launch-message.is-error { border-color:#d6a39b; background:#fff3f1; color:#963f35; }
.launch-message.is-success { display:grid; grid-template-columns:auto 1fr auto; gap:8px 12px; align-items:center; border-color:#a8c8b3; background:#f2faf5; color:#355e44; }
.launch-message code { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.launch-message a { color:#285d7b; font-weight:700; }
.launch-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; border-top:1px solid #d2dadd; background:#edf2f4; }
.launch-actions span { color:#70818a; font:9px "Courier New",monospace; }
.launch-actions button { min-width:130px; padding:8px 12px; border:1px solid #17496e; border-radius:2px; background:linear-gradient(#447faa,#2d6794); color:white; font:700 9px "Courier New",monospace; letter-spacing:.04em; cursor:pointer; }
.launch-actions button:disabled { opacity:.5; cursor:default; }
@media (max-width: 620px) {
  .launch-shell { padding:44px 8px 36px; }
  .launch-grid { grid-template-columns:1fr; padding:12px; }
  .launch-wide { grid-column:auto; }
  .launch-risk, .launch-message { margin-inline:12px; }
  .launch-actions { padding-inline:12px; align-items:stretch; flex-direction:column; }
  .launch-actions button { width:100%; }
  .launch-message.is-success { grid-template-columns:1fr; }
}
/* Coins tab: launched coins and the launch form. */
.coins-panel { display: grid; gap: 10px; align-content: start; overflow: auto; }
.coins-list { display: grid; gap: 2px; }
.coin-row { display: grid; grid-template-columns: 70px minmax(0,1fr) auto auto auto; gap: 10px; align-items: center; padding: 6px 10px; background: #fff; border-bottom: 1px solid #e4e9eb; font-size: 11px; }
.coin-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #506774; }
.coin-row code { cursor: copy; font-size: 10px; }
.coin-row a { color: #285d7b; font-size: 10px; font-weight: 700; }
.coins-panel .launch-form { border-top: 1px solid #d2dadd; }
.agent-tab-workspace[hidden] { display: none !important; }
/* Compare / baskets in the New position modal. */
.deploy-strategy-shell { position: relative; }
.compare-toggle { position: absolute; top: 4px; right: 4px; padding: 2px 6px; border: 1px solid #c3cdd2; background: #f2f4f4; color: #596c78; font: 700 8px "Courier New", monospace; cursor: pointer; }
.compare-toggle.is-active { background: #245a80; border-color: #245a80; color: #fff; }
.compare-field { display: grid; gap: 6px; padding: 6px 70px 6px 8px; border: 1px solid #c3cdd2; background: #fff; }
.compare-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 8px; max-height: 210px; overflow: auto; }
.compare-list label { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #506774; cursor: pointer; }
.compare-list label.is-selected { color: #174b69; font-weight: 700; }
.compare-list b { font: 700 9px "Courier New", monospace; }
.basket-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.basket-chip { display: inline-flex; border: 1px solid #245a80; }
.basket-chip button { border: 0; background: #e6eef3; color: #245a80; font: 700 9px "Courier New", monospace; padding: 2px 6px; cursor: pointer; }
.basket-chip button + button { background: #fff; padding: 2px 5px; }
.basket-save { display: flex; gap: 4px; }
.basket-save input { flex: 1; min-width: 0; height: 24px; padding: 0 6px; border: 1px solid #c3cdd2; font-size: 10px; }
/* P&L at the right end of the workspace tab row. */
.tabs-pnl { margin-left: auto; display: inline-flex; align-items: baseline; gap: 6px; padding: 0 10px; white-space: nowrap; }
.tabs-pnl small { color: #6e8794; font: 700 8px "Courier New", monospace; }
.tabs-pnl strong { font-size: 12px; }
.tabs-pnl strong.positive { color: #2a8a5a; }
.tabs-pnl strong.negative { color: #b24a3d; }
.tabs-row { display: flex; align-items: stretch; min-width: 0; }
.tabs-row > .agent-primary-tabs { flex: 1; min-width: 0; }
.tabs-row > .tabs-pnl { align-self: center; }
/* P&L totals in the positions header, next to the filters. */
.positions-pnl { display: inline-flex; align-items: baseline; gap: 12px; margin-left: 8px; white-space: nowrap; }
.positions-pnl > span { display: inline-flex; align-items: baseline; gap: 4px; }
.positions-pnl small { color: #6e8794; font: 700 8px "Courier New", monospace; }
.positions-pnl strong { font-size: 11px; }
.positions-pnl strong.positive { color: #2a8a5a; }
.positions-pnl strong.negative { color: #b24a3d; }
/* Coins tab: cards and the launch modal. */
.coins-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 8px; }
.coin-card { display: grid; gap: 4px; padding: 10px; background: #fff; border: 1px solid #d2dadd; }
.coin-card-head { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.coin-card-head strong { color: #174b69; font-size: 13px; }
.coin-card-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #506774; font-size: 11px; }
.coin-card code { cursor: copy; font-size: 10px; }
.coin-card small { color: #7b8990; font-size: 9px; }
.coin-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.coin-card-actions a { color: #285d7b; font-size: 10px; font-weight: 700; }
.launch-window { width: min(640px, calc(100vw - 32px)); }
/* Combined position chart with hover readout. */
.position-history-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 10px "Courier New", monospace; color: #506774; }
.position-history-legend span { display: inline-flex; align-items: center; gap: 5px; }
.position-history-legend i { width: 10px; height: 2px; display: inline-block; }
.position-history-legend strong { color: #203746; }
.position-history-readout { height: 14px; line-height: 14px; margin: 4px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 10px "Courier New", monospace; color: #174b69; }
.position-history > svg { width: 100%; height: 160px; display: block; border-bottom: 1px solid #dde5e8; background: #fbfcfd; cursor: crosshair; touch-action: pan-y; }
.position-history > svg polyline { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.position-history-cursor { stroke: #8aa0ad; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

.chat-confirmation-image { display: block; width: 96px; height: 96px; margin: 6px 0; border-radius: 6px; -o-object-fit: cover; object-fit: cover; border: 1px solid #dde5e8; }
.chat-confirmation-settings .is-wide { grid-column: 1 / -1; }
.chat-confirmation-edit { display: flex; align-items: center; gap: 4px; }
.chat-confirmation-edit input, .chat-confirmation-edit textarea { flex: 1; min-width: 0; width: 100%; border: 1px solid #c3cdd2; background: #fff; padding: 2px 4px; font: inherit; color: inherit; resize: vertical; }
.chat-confirmation-edit em { font-style: normal; color: #79858b; font-size: 0.85em; }
.coins-rewards { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
.coins-rewards small { color: #79858b; font: 700 8px "Courier New", monospace; }
.coins-rewards em { font-style: normal; color: #4f6b7a; font-size: 10px; }

/* Navigation. Desktop: the sidebar replaces the top bar and can slide away
   (its state is remembered). Mobile: the top bar's menu drops the sidebar down. */
.sidebar { position: fixed; z-index: 120; top: 0; bottom: 0; left: 0; width: 160px; overflow-y: auto; background: #eef1f2; border-right: 1px solid #c3cdd2; box-sizing: border-box; }
.sidebar-ready .sidebar, .sidebar-ready.with-sidebar { transition: transform 0.22s ease, padding-left 0.22s ease, opacity 0.18s ease; }
.sidebar-inner { display: flex; flex-direction: column; padding-bottom: 12px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 6px 0 14px; border-bottom: 1px solid #dde5e8; margin-bottom: 6px; }
.sidebar-brand { color: #0b4ea2; text-decoration: none; font: 800 12px "Courier New", monospace; letter-spacing: 0.08em; }
.sidebar-toggle, .sidebar-create { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid transparent; background: none; color: #4f6b7a; cursor: pointer; }
.sidebar-toggle:hover, .sidebar-create:hover { border-color: #c3cdd2; background: #fff; }
.sidebar-toggle .control-glyph { transform: rotate(90deg); }
.sidebar-link { display: block; padding: 6px 14px; color: #244a65; text-decoration: none; font: 700 11px "Courier New", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-link:hover { background: #e2e8ea; }
.sidebar-link.is-active { background: #0b4ea2; color: #fff; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px 4px 14px; }
.sidebar-heading small { color: #79858b; font: 700 8px "Courier New", monospace; }
.sidebar-empty { padding: 4px 14px; color: #8a979d; font-size: 10px; }
.sidebar-reopen { position: fixed; z-index: 110; top: 8px; left: 0; width: 18px; height: 28px; padding: 0; border: 1px solid #c3cdd2; border-left: 0; background: #eef1f2; color: #4f6b7a; font: 700 14px/1 "Courier New", monospace; cursor: pointer; opacity: 0; pointer-events: none; }
.deskbar-menu { display: none; }
@media (min-width: 761px) {
  body.with-sidebar { padding-left: 160px; }
  body.with-sidebar .deskbar { display: none; }
  /* Pages leave room for the top bar; without it they start 30px higher. */
  body.with-sidebar > main { margin-top: -30px; }
  body.with-sidebar .agent-desktop .agent-shell:not(.route-loading) { height: calc(100vh - 22px); }
  body.with-sidebar .home-dashboard { height: calc(100dvh - 72px); }
  body.with-sidebar.sidebar-collapsed { padding-left: 0; }
  body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
  body.sidebar-collapsed .sidebar-reopen { opacity: 1; pointer-events: auto; }
}
@media (max-width: 760px) {
  .sidebar { top: 30px; bottom: auto; width: 100%; max-height: calc(100dvh - 30px); border-right: 0; border-bottom: 1px solid #c3cdd2; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); transform: translateY(-110%); opacity: 0; pointer-events: none; }
  body.nav-open .sidebar { transform: none; opacity: 1; pointer-events: auto; }
  .sidebar-top { display: none; }
  .sidebar-reopen { display: none; }
  .deskbar-menu { display: grid; place-items: center; width: 28px; height: 24px; margin-right: 6px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
}

/* Explore pages: /coins, /coin/<mint>, /strategies */
.explore-route { padding: 42px 16px 24px; box-sizing: border-box; }
.explore-window { max-width: 1100px; margin: 0 auto 12px; }
.explore-empty { padding: 24px; text-align: center; color: #6e8794; font: 700 11px "Courier New", monospace; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; padding: 10px; }
.explore-card { display: flex; gap: 10px; padding: 10px; background: #fff; border: 1px solid #c3cdd2; color: inherit; text-decoration: none; min-width: 0; }
a.explore-card:hover { border-color: #0b4ea2; }
.coin-tile img, .coin-tile-mark { width: 52px; height: 52px; flex: none; border-radius: 6px; -o-object-fit: cover; object-fit: cover; }
.coin-tile-mark { display: grid; place-items: center; background: #0b4ea2; color: #fff; font: 800 16px "Courier New", monospace; }
.coin-tile-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coin-tile-body strong { font: 800 13px "Courier New", monospace; color: #244a65; }
.coin-tile-body span, .coin-tile-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-tile-body small { color: #6e8794; }
.coin-page { max-width: 1100px; margin: 0 auto; }
.coin-hero { display: flex; gap: 16px; padding: 14px; }
.coin-hero-logo { width: 120px; height: 120px; flex: none; border-radius: 10px; -o-object-fit: cover; object-fit: cover; border: 1px solid #dde5e8; font-size: 32px; }
.coin-hero-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.coin-hero-body h1 { margin: 0; font: 800 22px "Courier New", monospace; color: #244a65; }
.coin-hero-body h1 span { font-size: 14px; color: #6e8794; }
.coin-hero-body p { margin: 0; }
.coin-hero-facts { display: flex; flex-wrap: wrap; gap: 18px; }
.coin-hero-facts span { display: flex; flex-direction: column; }
.coin-hero-facts small { color: #79858b; font: 700 8px "Courier New", monospace; }
.coin-hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 11px; }
.coin-hero-links code { overflow-wrap: anywhere; color: #4f6b7a; }
.coin-chart { padding: 10px; }
.coin-chart svg { width: 100%; height: 180px; display: block; background: #fbfcfd; border-bottom: 1px solid #dde5e8; }
.coin-chart polyline { fill: none; stroke: #3c83b4; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.coin-chart-scale { display: flex; justify-content: space-between; color: #6e8794; font: 10px "Courier New", monospace; }
.explore-table-wrap { overflow-x: auto; }
.explore-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.explore-table th { text-align: left; color: #79858b; font: 700 8px "Courier New", monospace; padding: 6px 10px; border-bottom: 1px solid #dde5e8; }
.explore-table td { padding: 6px 10px; border-bottom: 1px solid #eef1f2; white-space: nowrap; }
.strategy-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.strategy-tile { flex-direction: column; gap: 6px; }
.strategy-tile header { display: flex; justify-content: space-between; align-items: baseline; }
.strategy-tile header strong { color: #244a65; font: 800 13px "Courier New", monospace; }
.strategy-tile > small { color: #6e8794; }
.strategy-tile p { margin: 0; font-size: 11px; line-height: 1.4; }
.strategy-tile dl { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin: 0; font-size: 11px; }
.strategy-tile dl div { display: flex; justify-content: space-between; gap: 6px; }
.strategy-tile dt { color: #6e8794; }
.strategy-tile dd { margin: 0; font-weight: 700; }
.strategy-tile footer { display: flex; gap: 14px; margin-top: auto; padding-top: 6px; border-top: 1px solid #eef1f2; }
.strategy-tile footer span { display: flex; flex-direction: column; }
.strategy-tile footer small { color: #79858b; font: 700 8px "Courier New", monospace; }
@media (max-width: 560px) { .coin-hero { flex-direction: column; } }
/* Editable card values: always look editable (pencil + dotted underline), and turn input-like on hover. */
.chat-setting-button { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: -2px -4px; padding: 2px 4px; border: 1px solid transparent; border-radius: 2px; background: none; color: inherit; font: inherit; text-align: left; cursor: text; overflow-wrap: anywhere; -webkit-text-decoration: underline dotted #8fb0c4; text-decoration: underline dotted #8fb0c4; text-underline-offset: 3px; }
.chat-setting-button .control-glyph { flex: none; width: 10px; height: 10px; color: #3c83b4; opacity: 0.7; }
.chat-setting-button:not(:disabled):hover, .chat-setting-button:focus-visible { border-color: #9fb9c9; background: #fff; text-decoration-color: transparent; }
.chat-setting-button:disabled { cursor: default; text-decoration-color: transparent; }
.chat-setting-button:disabled .control-glyph { visibility: hidden; }
.chat-setting-button:hover .control-glyph, .chat-setting-button:focus-visible .control-glyph { opacity: 1; }
.agent-tile .coin-tile-body span { font: 11px "Courier New", monospace; color: #4f6b7a; }
.reclaim-control { display: inline-flex; align-items: center; gap: 8px; }
.reclaim-control small { color: #4f6b7a; font: 700 9px "Courier New", monospace; }
/* Card rows: the label keeps its width, the value takes the rest (right-aligned)
   and wraps only at word breaks; a multi-line value (description) gets its own row. */
.chat-confirmation-settings { grid-template-columns: minmax(0, 1fr); }
.chat-confirmation-settings > div { align-items: baseline; min-width: 0; }
.chat-confirmation-settings dt { flex: none; }
.chat-confirmation-settings dd { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; text-align: right; }
.chat-confirmation-settings > div.is-wide { flex-direction: column; gap: 2px; }
.chat-confirmation-settings > div.is-wide dd { justify-content: flex-start; text-align: left; width: 100%; }
.chat-confirmation-settings .chat-confirmation-edit { width: 100%; }
/* The inspector chart fills the height its panel has (it stretches with the
   window); the legend, readout and time row keep their natural size. */
.agent-desktop .inspector-panel > .position-history > svg { flex: 1 1 auto; height: auto; min-height: 140px; }
.agent-desktop .inspector-panel > .position-history > :not(svg) { flex: none; }

/* Unified catalog/detail language. These routes deliberately inherit the home/agent palette. */
.index-page,
.detail-page {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  color: var(--ink);
}

.index-head {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #c5ced2;
}

.index-head h1 {
  margin: 0;
  color: #173f5a;
  font-size: 16px;
  font-weight: 800;
}

.index-head > span {
  color: #89959b;
  font: 700 8px "Courier New", monospace;
}

.index-loading { min-height: 180px; }
.index-empty { min-height: 120px; display: grid; place-items: center; color: #96a1a6; font: 700 10px "Courier New", monospace; }

.entity-table { border-bottom: 1px solid #cfd7da; }
.entity-table-head,
.entity-row {
  display: grid;
  align-items: center;
  min-width: 0;
}
.entity-table-head {
  min-height: 28px;
  border-bottom: 1px solid #dce2e4;
  color: #8a969b;
  font: 700 7px "Courier New", monospace;
}
.entity-row {
  min-height: 54px;
  border-bottom: 1px solid #e3e8ea;
  color: #536872;
  text-decoration: none;
  background: rgba(255,255,255,.42);
}
.entity-row:hover { background: #fbfcfb; }
.entity-row > code { color: #3d5968; font-size: 9px; }
.entity-main { min-width: 0; display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.entity-main > span { min-width: 0; display: grid; gap: 2px; }
.entity-main strong { overflow: hidden; color: #214b63; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.entity-main code, .entity-main small { overflow: hidden; color: #839097; font: 8px "Courier New", monospace; text-overflow: ellipsis; white-space: nowrap; }
.entity-status { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #b3bcc0; }
.entity-status.is-live { background: #35a861; }
.entity-link { color: #285f7d; text-decoration: none; font-size: 10px; font-weight: 700; }
.entity-link:hover { text-decoration: underline; }
.entity-avatar { width: 32px; height: 32px; flex: none; border: 1px solid #d2dade; border-radius: 50%; -o-object-fit: cover; object-fit: cover; }
.entity-avatar-fallback { display: grid; place-items: center; background: #e8eef1; color: #315d77; font: 800 9px "Courier New", monospace; }

.agent-index .entity-table-head,
.agent-index .entity-row { grid-template-columns: minmax(220px, 1.6fr) 86px 88px 72px 72px 86px; gap: 12px; padding: 0 10px; }
.coin-index .entity-table-head,
.coin-index .entity-row { grid-template-columns: minmax(230px, 1.7fr) 90px minmax(100px, .8fr) 70px 70px; gap: 12px; padding: 0 10px; }

.strat-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; padding-top: 10px; }
.strat-index-card { min-width: 0; display: flex; flex-direction: column; gap: 7px; min-height: 158px; padding: 12px; border: 1px solid #cbd3d6; background: #fbfcfb; color: inherit; text-decoration: none; }
.strat-index-card:hover { border-color: #7e9aaa; background: #fff; }
.strat-index-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.strat-index-card header code { color: #315f7b; font-size: 9px; font-weight: 700; }
.strat-index-card header span { color: #8a969c; font-size: 9px; }
.strat-index-card > strong { color: #173f5a; font-size: 13px; }
.strat-index-card > p { margin: 0; color: #60717a; font-size: 10px; line-height: 1.5; }
.strat-index-card footer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: auto; padding-top: 8px; border-top: 1px solid #e2e7e9; }
.strat-index-card footer span { display: grid; gap: 2px; padding-left: 8px; border-left: 1px solid #e2e7e9; }
.strat-index-card footer span:first-child { padding-left: 0; border-left: 0; }
.strat-index-card footer b { color: #35586c; font: 700 9px "Courier New", monospace; }
.strat-index-card footer small { color: #909ba0; font: 700 6px "Courier New", monospace; }

.detail-page { padding-top: 4px; }
.detail-hero { min-height: 116px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; border-bottom: 1px solid #c5ced2; }
.detail-identity { min-width: 0; }
.detail-identity > code { color: #315f7b; font-size: 9px; font-weight: 700; }
.detail-identity h1 { margin: 5px 0 4px; color: #173f5a; font-size: 21px; }
.detail-identity p { max-width: 720px; margin: 0; color: #62747d; font-size: 10px; line-height: 1.5; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(58px, auto)); }
.detail-metrics span { display: grid; gap: 2px; padding: 0 12px; border-left: 1px solid #dce2e4; }
.detail-metrics b { color: #294f65; font: 700 10px "Courier New", monospace; }
.detail-metrics small { color: #909ba0; font: 700 6px "Courier New", monospace; }
.detail-meta-line { min-height: 34px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 14px; border-bottom: 1px solid #e0e5e7; color: #70818a; font-size: 9px; }
.detail-meta-line code { color: #87949a; }
.strat-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, .7fr); gap: 20px; padding: 16px 0; }
.strat-config-group { border-top: 1px solid #d2dade; }
.strat-config-group > header { padding: 7px 0; color: #74848c; font: 700 8px "Courier New", monospace; }
.strat-config-row { min-height: 52px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; border-top: 1px solid #e7ebed; }
.strat-config-row > span { min-width: 0; display: grid; gap: 2px; }
.strat-config-row strong { color: #294e63; font-size: 10px; }
.strat-config-row small { color: #7d8b92; font-size: 8px; line-height: 1.35; }
.strat-config-row code { color: #294e63; font-size: 9px; font-weight: 700; text-align: right; }
.strat-about { border-left: 1px solid #dbe1e3; padding-left: 18px; }
.strat-about p { margin: 0 0 16px; color: #5f717a; font-size: 10px; line-height: 1.6; }
.strat-about dl { margin: 0; }
.strat-about dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #e5eaec; }
.strat-about dt { color: #8b969b; font: 700 7px "Courier New", monospace; }
.strat-about dd { margin: 0; color: #3c5867; font-size: 9px; text-align: right; }
.strat-source { border-top: 1px solid #cbd3d6; padding: 9px 0 18px; }
.strat-source summary { color: #315f7b; font: 700 9px "Courier New", monospace; cursor: pointer; }
.strat-source pre { max-height: 520px; overflow: auto; padding: 12px; background: #eef2f3; border: 1px solid #d4dcdf; font-size: 9px; }

.mind-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; padding-top: 10px; }
.mind-index-card { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; border: 1px solid #cbd3d6; background: #fbfcfb; color: inherit; text-decoration: none; }
.mind-index-card:hover { border-color: #7e9aaa; background: #fff; }
.mind-index-arrow { color: #87959c; font: 20px "Courier New", monospace; }
.distro-index .entity-table-head { grid-template-columns: 1.2fr 1fr 1fr 72px 100px 72px; gap: 12px; padding: 0 10px; }
.distro-index .index-empty { border-bottom: 1px solid #e3e8ea; }

.coin-detail-hero { min-height: 132px; display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid #c5ced2; }
.coin-detail-logo { width: 72px; height: 72px; border-radius: 50%; border: 1px solid #d1dadd; -o-object-fit: cover; object-fit: cover; }
.coin-detail-identity { min-width: 0; }
.coin-detail-identity h1 { margin: 0 0 5px; color: #173f5a; font: 800 20px "Courier New", monospace; }
.coin-detail-identity h1 span { color: #6e8089; font-size: 12px; }
.coin-detail-identity p { max-width: 680px; margin: 0 0 8px; color: #63757e; font-size: 9px; line-height: 1.45; }
.coin-detail-links { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 9px; }
.coin-detail-links code { max-width: min(380px, 100%); overflow: hidden; color: #87949a; text-overflow: ellipsis; }
.coin-detail-links a { color: #315f7b; text-decoration: none; }
.coin-detail-facts { display: flex; gap: 0; }
.coin-detail-facts > span { min-width: 90px; display: grid; gap: 3px; padding: 0 14px; border-left: 1px solid #dce2e4; }
.coin-detail-facts small { color: #909ba0; font: 700 6px "Courier New", monospace; }
.coin-detail-facts strong { color: #294f65; font-size: 10px; }
.coin-detail-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px,.7fr); gap: 10px; padding-top: 10px; }
.detail-section { min-width: 0; border: 1px solid #cfd7da; background: #fbfcfb; }
.detail-section > header { min-height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-bottom: 1px solid #dde3e5; }
.detail-section > header strong { color: #536b78; font: 700 8px "Courier New", monospace; }
.detail-section > header span { color: #919ca1; font: 700 7px "Courier New", monospace; }
.coin-chart-clean { padding: 10px; }
.coin-chart-clean svg { width: 100%; height: 210px; display: block; border-bottom: 1px solid #e1e6e8; background: #fff; }
.coin-chart-clean polyline { fill: none; stroke: #3c83b4; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.coin-chart-empty { min-height: 250px; }
.coin-strat-list { max-height: 272px; overflow: auto; }
.coin-strat-row { min-height: 44px; display: grid; grid-template-columns: minmax(80px,1fr) minmax(80px,1fr) 70px 64px auto; align-items: center; gap: 8px; padding: 0 9px; border-bottom: 1px solid #e7ebed; font-size: 9px; }
.coin-strat-instance { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Courier New", monospace; font-size: 8px; }
.coin-activity-section { margin-top: 10px; }
.coin-activity-list { max-height: 280px; overflow: auto; }
.coin-activity-row { min-height: 34px; display: grid; grid-template-columns: 74px minmax(110px,1fr) 48px 90px 90px; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid #e7ebed; color: #657780; font-size: 9px; }
.coin-activity-row code { color: #3d5968; text-align: right; }

/* Agent navigation now reflects the product model, not the old implementation nouns. */
.agent-primary-tabs { min-height: 36px; align-items: center; gap: 18px; padding: 0 12px; border-top: 0; border-bottom: 1px solid #bcc6ca; background: #f4f6f6; }
.agent-primary-tabs button { min-width: 0; height: 36px; padding: 0 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #73828a; font-size: 10px; }
.agent-primary-tabs button.is-active { top: 0; border-bottom-color: #2d6897; background: transparent; color: #173f5a; }
.instance-strategy-cell a, .inspector-strat-link { color: #315f7b; text-decoration: none; font: 700 8px "Courier New", monospace; }
.instance-strategy-cell a:hover, .inspector-strat-link:hover { text-decoration: underline; }
.inspector-id { gap: 7px; }
.agent-future-panel { min-height: 0; flex: 1; background: #f8f9f8; }
.agent-future-head { min-height: 30px; display: grid; grid-template-columns: 1.2fr 1fr 70px 100px 70px; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid #d9e0e2; color: #8a969b; font: 700 7px "Courier New", monospace; }
.agent-future-empty { flex: 1; display: grid; place-items: center; color: #9aa4a9; font: 700 10px "Courier New", monospace; }
.mind-panel { min-height: 0; flex: 1; display: grid !important; grid-template-columns: minmax(0, 1fr) 220px; background: #f8f9f8; }
.mind-panel[hidden] { display: none !important; }
.mind-prompt-panel { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid #d4dcdf; }
.mind-prompt-panel > header { min-height: 30px; display: flex; align-items: center; padding: 0 12px; border-bottom: 1px solid #dce2e4; color: #839098; font: 700 7px "Courier New", monospace; }
.mind-prompt-empty { flex: 1; display: grid; place-items: center; color: #9aa4a9; font: 700 10px "Courier New", monospace; }
.mind-runtime-panel { padding: 10px; background: #f1f4f4; }
.mind-runtime-panel > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; border-bottom: 1px solid #dce2e4; }
.mind-runtime-panel small { color: #87949a; font: 700 7px "Courier New", monospace; }
.mind-runtime-panel strong { color: #536b78; font: 700 9px "Courier New", monospace; }

.sidebar-agent-divider { height: 18px; display: flex; align-items: center; gap: 6px; padding: 4px 6px 0 14px; }
.sidebar-agent-divider > span { height: 1px; flex: 1; background: #d3dce0; }
.sidebar-agent-link { color: #58707d; font-size: 10px; font-weight: 600; }
.sidebar-agent-link.is-active { background: #dce7ed; color: #174b69; box-shadow: inset 2px 0 #2d6897; }

@media (max-width: 820px) {
  .agent-index .entity-table-head, .coin-index .entity-table-head { display: none; }
  .agent-index .entity-row { grid-template-columns: minmax(0,1fr) 70px 70px; }
  .agent-index .entity-row > :nth-child(4), .agent-index .entity-row > :nth-child(5), .agent-index .entity-row > :nth-child(6) { display: none; }
  .coin-index .entity-row { grid-template-columns: minmax(0,1fr) 76px minmax(80px,.8fr); }
  .coin-index .entity-row > :nth-child(4), .coin-index .entity-row > :nth-child(5) { display: none; }
  .detail-hero { grid-template-columns: 1fr; gap: 12px; padding: 16px 0; }
  .detail-metrics { width: 100%; }
  .detail-metrics span:first-child { border-left: 0; padding-left: 0; }
  .strat-detail-grid, .coin-detail-grid { grid-template-columns: 1fr; }
  .strat-about { border-left: 0; border-top: 1px solid #dbe1e3; padding: 14px 0 0; }
  .coin-detail-hero { grid-template-columns: 58px minmax(0,1fr); padding: 14px 0; }
  .coin-detail-logo { width: 58px; height: 58px; }
  .coin-detail-facts { grid-column: 1 / -1; }
  .coin-detail-facts > span:first-child { border-left: 0; padding-left: 0; }
  .mind-panel { grid-template-columns: 1fr; }
  .mind-prompt-panel { min-height: 280px; border-right: 0; border-bottom: 1px solid #d4dcdf; }
}

@media (max-width: 560px) {
  .index-page, .detail-page { width: calc(100% - 18px); }
  .strat-index-grid, .mind-index-grid { grid-template-columns: 1fr; }
  .agent-primary-tabs { gap: 12px; }
  .coin-strat-row { grid-template-columns: minmax(90px,1fr) minmax(80px,1fr) auto; }
  .coin-strat-row > :nth-child(3), .coin-strat-row > :nth-child(4) { display: none; }
  .coin-activity-row { grid-template-columns: 58px minmax(90px,1fr) 46px 80px; }
  .coin-activity-row > :last-child { display: none; }
}
.strat-usage-section { margin-bottom: 10px; }
.strat-usage-list { max-height: 320px; overflow: auto; }
.strat-usage-row { min-height: 40px; display: grid; grid-template-columns: minmax(110px,1fr) 80px 86px 72px 72px auto; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid #e7ebed; color: #63747d; font-size: 9px; }
.strat-usage-row code { color: #3d5968; text-align: right; }
.strat-usage-instance { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Courier New", monospace; font-size: 8px; }
@media (max-width: 680px) {
  .strat-usage-row { grid-template-columns: minmax(90px,1fr) 70px 70px auto; }
  .strat-usage-row > :nth-child(3), .strat-usage-row > :nth-child(5) { display: none; }
}
.coins-panel-bar { justify-content: flex-end; }
.coins-list { display: block; padding: 0; }
.coin-card { min-height: 58px; display: grid; grid-template-columns: minmax(150px,1.2fr) 86px minmax(150px,1fr) auto; align-items: center; gap: 12px; padding: 7px 10px; border: 0; border-bottom: 1px solid #e1e6e8; background: #fbfcfb; }
.coin-card-head { min-width: 0; }
.coin-card-head a { color: #174b69; text-decoration: none; }
.coin-card > code { overflow: hidden; color: #75868e; text-overflow: ellipsis; white-space: nowrap; }
.coin-card > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-card-actions { justify-content: flex-end; margin: 0; }
@media (max-width: 720px) {
  .coin-card { grid-template-columns: minmax(0,1fr) auto; }
  .coin-card > code, .coin-card > small { display: none; }
}
.launch-detail-page { padding-top: 4px; }
.launch-detail-form { margin: 10px 0 0; border: 1px solid #cbd3d6; background: #fbfcfb; }
.launch-detail-form .launch-grid { padding: 14px; }
.launch-detail-form .launch-risk { min-height: 34px; display: flex; align-items: center; margin: 0 14px; padding: 0; border: 0; border-top: 1px solid #e2e7e9; background: transparent; color: #8d514b; font: 700 8px "Courier New", monospace; }
/* Redesign follow-ups: columns that fit their panel and labelled run lists. */
.coin-strat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto auto; }
.coin-strat-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strat-usage-row { grid-template-columns: minmax(110px, 1fr) minmax(70px, .7fr) 80px 70px 80px 80px; }
.strat-usage-row > :nth-child(4), .strat-usage-row > :nth-child(5) { text-align: right; }
.strat-usage-row > :last-child { justify-self: end; }
.strat-usage-head { min-height: 28px; position: sticky; top: 0; z-index: 1; background: #f4f6f6; color: #8a969b; font: 700 7px "Courier New", monospace; }

/*# sourceMappingURL=globals-2c3bc2f9.css.map */