.range-pair[data-ready] {
  --range-knob-size: 18px;
  position: relative;
  min-width: 0;
  height: 44px;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}

.range-pair__rail {
  position: absolute;
  top: 50%;
  right: calc(var(--range-knob-size) / 2);
  left: calc(var(--range-knob-size) / 2);
  height: 4px;
  border-radius: 3px;
  transform: translateY(-50%);
  background: var(--range-rail, #69766b);
  pointer-events: none;
}
.range-pair__rail::after {
  content: "";
  position: absolute;
  inset: 0 calc(100% - var(--range-end)) 0 var(--range-start);
  border-radius: inherit;
  background: var(--range-accent, #d4aa60);
}

/* Keep the two native, focusable controls on a single painted rail. */
.range-pair[data-ready] > input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  pointer-events: none;
}
.range-pair[data-ready] > input::-webkit-slider-runnable-track {
  height: 4px;
  border: 0;
  background: transparent;
}
.range-pair[data-ready] > input::-moz-range-track,
.range-pair[data-ready] > input::-moz-range-progress {
  height: 4px;
  border: 0;
  background: transparent;
}
.range-pair[data-ready] > input::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: var(--range-knob-size);
  height: var(--range-knob-size);
  margin-top: calc((4px - var(--range-knob-size)) / 2);
  border: 2px solid var(--range-accent, #d4aa60);
  border-radius: 50%;
  background: var(--range-knob, #fff8e9);
}
.range-pair[data-ready] > input::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--range-knob-size);
  height: var(--range-knob-size);
  border: 2px solid var(--range-accent, #d4aa60);
  border-radius: 50%;
  background: var(--range-knob, #fff8e9);
}
.range-pair[data-ready] > input:focus { z-index: 1; }
.range-pair[data-ready] > input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.range-pair[data-ready] > input:focus-visible::-moz-range-thumb {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.range-pair[data-ready] > input { color: inherit; }

@media (forced-colors: active) {
  .range-pair[data-ready] {
    --range-accent: Highlight;
    --range-knob: Canvas;
    --range-rail: GrayText;
    forced-color-adjust: none;
  }
}
