.backtestRelatedTools {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 0 28px;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.09));
  background: #0e0f12;
  color: var(--color-text-muted, #70767d);
}

.backtestRelatedTools__label {
  flex: none;
  color: #858b93;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
}

.backtestRelatedTools__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.backtestRelatedTools__button {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 5px;
  background: #0a0b0e;
  color: var(--color-accent, #7dd3fc);
  font: inherit;
  font-size: 11px;
  line-height: 24px;
  white-space: nowrap;
  cursor: pointer;
}

.backtestRelatedTools__button:hover,
.backtestRelatedTools__button:focus-visible,
.backtestRelatedTools__button[aria-expanded="true"] {
  border-color: rgba(125, 211, 252, 0.65);
  background: rgba(125, 211, 252, 0.1);
  color: #b6e8ff;
}

.backtestRelatedTools__button:focus-visible,
.backtestToolWindow__close:focus-visible,
.backtestToolWindow__fallback a:focus-visible {
  outline: 2px solid var(--color-accent, #7dd3fc);
  outline-offset: 3px;
}

.backtestToolWindow[hidden] {
  display: none;
}

.backtestToolWindow {
  position: fixed;
  z-index: 100;
  inset: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #08090c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.backtestToolWindow__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #111318;
}

.backtestToolWindow__heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.backtestToolWindow__eyebrow {
  color: #70767d;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
}

.backtestToolWindow__title {
  overflow: hidden;
  color: #e8eaed;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backtestToolWindow__close {
  flex: none;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  background: transparent;
  color: #aeb4bb;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.backtestToolWindow__close:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f3f5;
}

.backtestToolWindow__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #0a0b0e;
}

.backtestToolWindow__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0b0e;
}

.backtestToolWindow__loading,
.backtestToolWindow__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  color: #858b93;
  font-size: 12px;
  text-align: center;
}

.backtestToolWindow__loading[hidden],
.backtestToolWindow__fallback[hidden] {
  display: none;
}

.backtestToolWindow__fallback strong {
  color: #e8eaed;
  font-size: 14px;
  font-weight: 600;
}

.backtestToolWindow__fallback a {
  color: var(--color-accent, #7dd3fc);
  text-underline-offset: 3px;
}

body.backtest-tool-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .backtestRelatedTools {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    padding: 9px 14px;
  }

  .backtestRelatedTools__links {
    gap: 5px;
  }

  .backtestToolWindow {
    inset: 0;
    border-radius: 0;
    border-right: 0;
    border-left: 0;
  }

  .backtestToolWindow__chrome {
    min-height: 52px;
    padding: 0 12px 0 14px;
  }
}
