input {
  width: 100%;
  padding: .8rem .9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  font: inherit;
}

.mode-selector {
  display: flex;
  gap: .55rem;
  margin: 1.15rem 0 0;
  padding: 0;
  border: 0;
}

.mode-selector legend {
  margin-bottom: .45rem;
  font-size: .78rem;
  font-weight: 800;
}

.mode-selector label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin: 0;
  padding: .7rem;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  font-size: .78rem;
}

.mode-selector input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .75rem;
  align-items: end;
}

.range-grid input {
  font-variant-numeric: tabular-nums;
}

.hint--valid {
  color: var(--accent);
  font-weight: 750;
}

.hint--invalid {
  color: #b42318;
}

.series-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  font-size: .78rem;
  font-weight: 800;
}

.series-heading span:last-child {
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}

.series-list {
  display: grid;
  gap: .65rem;
}

.series-row {
  padding: .75rem;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.series-row label {
  margin-top: 0;
}

.remove-series {
  width: 42px;
  height: 42px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.secondary {
  margin-top: .65rem;
  padding: .65rem .85rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
}

.secondary:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .range-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mode-selector {
    flex-direction: column;
  }

  .remove-series {
    grid-column: 1 / -1;
    width: 100%;
  }
}
