:root {
  font-family: Inter, system-ui, sans-serif;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #0e1217;
  color: #dce3ef;
}
header {
  padding: 18px 22px 8px;
}
h1 {
  font-size: 22px;
  margin: 0 0 5px;
}
.sub {
  color: #93a1b4;
}
.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
  padding: 12px 20px;
  background: #151b22;
  border-block: 1px solid #27303d;
}
.group {
  border: 1px solid #313b49;
  border-radius: 8px;
  padding: 9px;
}
.group b {
  display: block;
  color: #f2f5fa;
  margin-bottom: 6px;
}
.group label {
  display: block;
  font-size: 12px;
  margin: 4px 0;
  color: #b9c4d2;
}
input,
select,
button {
  max-width: 100%;
  background: #202833;
  color: #eaf0f8;
  border: 1px solid #475569;
  border-radius: 5px;
  padding: 5px;
}
input[type="number"] {
  width: 72px;
}
button {
  cursor: pointer;
  margin: 3px;
}
.wide {
  grid-column: span 2;
}
.drop-zone {
  transition:
    border-color 0.15s,
    background 0.15s;
}
.drop-zone.dragging {
  border-color: #7c3aed;
  background: #211936;
}
.drop-hint {
  color: #93a1b4;
  font-size: 12px;
  margin-bottom: 7px;
}
.explain {
  padding: 9px 22px;
  color: #aeb9c8;
  font-size: 13px;
}
.explain strong {
  color: #2ecc71;
}
.off {
  color: #ef4444;
}
.info-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin: 0 5px;
  padding: 0;
  border: 1px solid #8f6dcc;
  border-radius: 50%;
  background: #241b36;
  color: #d6c3ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
.info-tip span {
  visibility: hidden;
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 9px);
  width: min(430px, 82vw);
  padding: 10px 12px;
  border: 1px solid #7252a8;
  border-radius: 7px;
  background: #171020;
  color: #e5dcf5;
  box-shadow: 0 8px 24px #000a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  transform: translateX(-50%);
}
.info-tip:hover span,
.info-tip:focus span,
.info-tip:focus-visible span {
  visibility: visible;
}
.summary {
  font-weight: 700;
  padding: 7px 22px;
}
.percentiles {
  padding: 5px 22px;
  overflow-x: auto;
}
.percentiles table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.percentiles th,
.percentiles td {
  border: 1px solid #313b49;
  padding: 5px 8px;
  text-align: right;
  white-space: nowrap;
}
.percentiles th:first-child {
  text-align: left;
}
.percentiles thead {
  color: #bf9bff;
}
.selectable-table tbody tr {
  cursor: pointer;
  transition:
    background-color 0.12s,
    color 0.12s;
}
.selectable-table tbody tr:hover {
  background: #242d3a;
}
.selectable-table tbody tr:focus-visible {
  outline: 2px solid #bf9bff;
  outline-offset: -2px;
}
.selectable-table tbody tr.selected-row {
  background: #49356c;
  color: #fff;
}
.selectable-table tbody tr.selected-row th,
.selectable-table tbody tr.selected-row td {
  border-color: #9c78d4;
}
#plot {
  height: calc(100vh - 335px);
  min-height: 650px;
}
.fixed {
  color: #bf9bff;
}
details {
  padding: 0 22px 15px;
  color: #aeb9c8;
}
code {
  color: #f4c542;
}
.tight-slider {
  width: 100%;
  margin-top: 5px;
}
.tight-label {
  display: flex !important;
  justify-content: space-between;
  font-size: 11px !important;
  margin-top: 12px !important;
}
@media (max-width: 700px) {
  .wide {
    grid-column: span 1;
  }
  #plot {
    height: 800px;
  }
  .controls {
    grid-template-columns: 1fr 1fr;
  }
}
