/* The native radio drives both the new highlight and the outgoing selection. */
#options .option {
  position: relative;
  isolation: isolate;
  min-height: 46px;
  background-color: transparent;
  color: var(--ink);
  transition: color .22s ease;
}

#options .option::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--tint);
  border-inline-start: 3px solid var(--blue);
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0;
  transition: transform .25s cubic-bezier(.4,0,.3,1), opacity .25s;
}

#options .option:has(:checked) { color: var(--blue); }
#options .option:has(:checked)::before {
  transform: scaleX(1);
  opacity: 1;
  transition-duration: .38s;
  transition-timing-function: cubic-bezier(.18,.78,.24,1);
}

#options input[type=radio] {
  appearance: none;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1.5px solid #69758a;
  border-radius: 50%;
  background: transparent;
  transition: border-color .18s;
}
#options input[type=radio]::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--blue);
  border-radius: 50%;
  transform: scale(0);
  transition: transform .19s cubic-bezier(.55,.04,.65,.7);
}
#options input[type=radio]:checked { border-color: var(--blue); }
#options input[type=radio]:checked::before {
  transform: scale(1);
  transition: transform .34s cubic-bezier(.22,1.55,.43,1);
}

.option-text {
  display: block;
  min-width: 0;
  padding-inline-end: 5px;
  transition: transform .24s cubic-bezier(.25,.65,.3,1);
}
#options :checked + .option-text { transform: translateX(5px); }

@media (hover: hover) {
  #options .option:hover:not(:has(:checked)) { color: var(--blue); }
  #options .option:hover input[type=radio] { border-color: var(--blue); }
}
@media (prefers-reduced-motion: reduce) {
  #options .option, #options .option::before, #options input[type=radio],
  #options input[type=radio]::before, .option-text { transition: none; }
  #options :checked + .option-text { transform: none; }
}
@media (forced-colors: active) {
  #options input[type=radio] { appearance: auto; }
  #options input[type=radio]::before { display: none; }
}
