.setup,
.setup * {
  min-width: 0;
}

.setup label[hidden] {
  display: none;
}

.pair,
.transport {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.runItem {
  grid-template-columns: minmax(0, 1fr) auto;
}

.setup input[type="datetime-local"] {
  padding-left: 5px;
  padding-right: 5px;
  font-size: 11px;
}

body {
  font-size: 14px;
}

main {
  grid-template-columns: 320px minmax(0, 1fr);
}

.identity b {
  font-size: 17px;
}

.identity small,
.topStats > span:not(.status),
.status,
.sectionTitle span,
.metrics small,
.metrics span,
.runItem small {
  font-size: 10px;
}

.topStats b,
.progressTop b {
  font-size: 13px;
}

.sectionTitle,
.setup button,
.progressTop span,
.runItem b {
  font-size: 12px;
}

.setup label,
.telemetry,
th,
td {
  font-size: 11px;
}

.setup input,
.setup select {
  font-size: 12px;
}

.metrics b {
  font-size: 21px;
}

.resultHighlights{overflow:hidden}
.highlightGrid{display:grid;grid-template-columns:1fr 1fr}
.highlightGrid article{display:grid;gap:5px;padding:14px 16px;min-width:0}
.highlightGrid article+article{border-left:1px solid var(--edge)}
.highlightGrid small,.highlightGrid span,.highlightGrid time{color:var(--muted);font-size:11px;font-style:normal}
.highlightGrid b{font-size:20px}
.highlightGrid time{display:block;overflow-wrap:anywhere}
@media(max-width:760px){.highlightGrid{grid-template-columns:1fr}.highlightGrid article+article{border-left:0;border-top:1px solid var(--edge)}}

.progressNumbers b {
  font-size: 21px;
}

.progressNumbers span {
  font-size: 11px;
}

.coverageBox {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #35404c;
  background: #0b1117;
}

.coverageBox span,
.coverageBox small,
.setup label small,
.progressTop small,
.dualTime small {
  color: var(--muted);
  font-size: 10px;
}

.coverageBox b {
  color: var(--gold);
  font-size: 12px;
}

.dualTime {
  display: grid;
  gap: 2px;
}

.dualTime small {
  display: block;
}

.chartHeader {
  height: 48px;
}

.chartPanel {
  grid-template-rows: 48px minmax(0, 1fr);
}

.chartControls,
.zoomControl,
.timezoneSwitch {
  display: flex;
  align-items: center;
}

.chartControls {
  gap: 14px;
}

.zoomControl {
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.zoomControl input {
  width: 90px;
  accent-color: var(--green);
}

.timezoneSwitch {
  border: 1px solid #35404c;
  border-radius: 4px;
  overflow: hidden;
}

.timezoneSwitch button {
  height: 27px;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid #35404c;
  background: #0b1117;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.timezoneSwitch button:last-child {
  border-right: 0;
}

.timezoneSwitch button.active {
  background: #275a49;
  color: #fff;
}

.chartWrap canvas {
  cursor: grab;
}

.chartWrap canvas.axisHover {
  cursor: ew-resize;
}

.chartWrap canvas.dragging {
  cursor: grabbing;
}

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

  .chartControls {
    gap: 8px;
  }
}

.setup .breakerSetting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 2px 0;
}

.breakerSetting > span {
  display: grid;
  gap: 3px;
}

.breakerSetting > span b {
  color: var(--text);
  font-size: 12px;
}

.breakerSetting > span small {
  color: var(--green);
  font-size: 10px;
}

.breakerSetting > span small.disabled {
  color: var(--red);
}

.setup .breakerSetting input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.breakerSetting i {
  width: 42px;
  height: 22px;
  border: 1px solid #43505d;
  border-radius: 11px;
  background: #202832;
  position: relative;
  cursor: pointer;
}

.breakerSetting i::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #8996a3;
  transition: 0.15s;
}

.breakerSetting input:checked + i {
  border-color: #278568;
  background: #163d32;
}

.breakerSetting input:checked + i::after {
  left: 22px;
  background: var(--green);
}

.breakerSetting input:focus + i {
  outline: 1px solid var(--blue);
}

.setup .riskNote {
  color: #d29a52;
  font-size: 10px;
  line-height: 1.4;
  margin-top: -7px;
}

.setup .historyButton {
  height: 38px;
  border-color: #8f742d;
  background: #241f13;
  color: #f0cb69;
  font-size: 11px;
}

.setup .historyButton:hover {
  background: #302817;
  border-color: var(--gold);
}

@media (max-width: 1050px) {
  main {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  main {
    display: block;
  }
}

.status.account_blown,
.status.insufficient_margin,
.status.volume_limit_exceeded {
  color: var(--red);
  border-color: #7a3038;
  background: #32171c;
}

.terminalDialog {
  width: min(430px, calc(100vw - 28px));
  padding: 25px;
  background: #10151b;
  color: var(--text);
  border: 1px solid #7a3038;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 24px 80px #000;
}

.terminalDialog::backdrop {
  background: #05070bcc;
}

.terminalDialog .terminalIcon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #4a1d24;
  color: #ff7c88;
  border: 1px solid #8d3540;
  font-size: 25px;
  font-weight: 900;
}

.terminalDialog h2 {
  margin: 0 0 9px;
  color: #ff7c88;
  font-size: 20px;
}

.terminalDialog p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.terminalDialog button {
  width: 100%;
  height: 38px;
  border: 1px solid #2e8a69;
  border-radius: 4px;
  background: #194f3d;
  color: #8af0c8;
  font-weight: 800;
  cursor: pointer;
}
